Skip to content
This repository has been archived by the owner on Nov 23, 2017. It is now read-only.

Missing comments at end of file #183

Open
puffnfresh opened this issue Jun 30, 2013 · 1 comment
Open

Missing comments at end of file #183

puffnfresh opened this issue Jun 30, 2013 · 1 comment
Labels

Comments

@puffnfresh
Copy link
Owner

// Strong
console.log 40 + 2

// Won't compile:
// console.log "40" + 2

// Explicit
let f x: Number = x

console.log (f 100)

// Won't compile:
// console.log (f "100")

type Person = {firstName: String, lastName: String}
let getName (x: Person) = x.firstName ++ " " ++ x.lastName

console.log (getName {firstName: "Brian", lastName: "McKenna"})

// Won't compile:
// console.log (getName {})

Notice that the last comment goes missing:

// Won't compile:
// Strong
console.log(40 + 2);
// Won't compile:
// console.log "40" + 2
// Explicit
var f = function (x) {
    return x;
};
console.log(f(100));
var getName = function (x) {
    // Won't compile:
    // console.log (f "100")
    return x.firstName + ' ' + x.lastName;
};
console.log(getName({
    'firstName': 'Brian',
    'lastName': 'McKenna'
}));//@ sourceMappingURL=types.js.map
@joneshf
Copy link
Collaborator

joneshf commented Jul 3, 2013

Looks like what's happening is that the last comment is going away completely, and any comments on the top level with no code beneath them are being put at the top of the file.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants