ceylon / ceylon-js

DEPRECATED
Apache License 2.0
54 stars 9 forks source link

runtime error creating tuple holding result of callable returning void #517

Closed jvasileff closed 9 years ago

jvasileff commented 9 years ago

This issue appears to be limited to cases where the function return type is represented by a type parameter.

shared void run() {
    [Integer, R] time<R>(R() f) => [0, f()];
    time(noop);
}

results in:

/Users/jvasileff/Applications/eclipse-4.4.1-ceylon/plugins/com.redhat.ceylon.dist.repo_1.1.1.v20150403-2047/repo/ceylon/language/1.1.1/ceylon.language-1.1.1.js:5907
} else if (elems[i].getT$all && elems[i].getT$name) {
                   ^
TypeError: Cannot read property 'getT$all' of undefined
    at Object.tpl$ (/Users/jvasileff/Applications/eclipse-4.4.1-ceylon/plugins/com.redhat.ceylon.dist.repo_1.1.1.v20150403-2047/repo/ceylon/language/1.1.1/ceylon.language-1.1.1.js:5907:20)
    at $5v9 (/Users/jvasileff/Dropbox/Repos/jv/ceylon-util/modules/com/vasileff/ceylon/util/0.0.1/com.vasileff.ceylon.util-0.0.1.js:39:22)
    at run (/Users/jvasileff/Dropbox/Repos/jv/ceylon-util/modules/com/vasileff/ceylon/util/0.0.1/com.vasileff.ceylon.util-0.0.1.js:42:5)
    at [eval]:1:336
    at Object.exports.runInThisContext (vm.js:74:17)
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (module.js:460:26)
    at evalScript (node.js:431:25)
    at startup (node.js:90:7)
    at node.js:814:3