ceylon / ceylon-js

DEPRECATED
Apache License 2.0
54 stars 9 forks source link

simple generic code breaks module #560

Closed jvasileff closed 9 years ago

jvasileff commented 9 years ago

Maybe related to the generic parameter identifier issue.

interface I {
    shared formal Integer f<A,B>();
}

class C() satisfies I {
    shared actual Integer f<C,D>() => nothing;
}

shared void run() {
    print("hello");
}

produces

$ ceylon run-js simple
/private/tmp/simple/modules/simple/1.0.0/simple-1.0.0.js:35
==undefined)$t$o252yf.C$f=$t$o252yf.A$fif($t$o252yf.D$f===undefined)$t$o252yf.
                                                                    ^^^^^^^^^
SyntaxError: Unexpected identifier
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at [eval]:1:85
    at Object.exports.runInThisContext (vm.js:74:17)
    at Object.<anonymous> ([eval]-wrapper:6:22)