ceylon / ceylon-js

DEPRECATED
Apache License 2.0
54 stars 9 forks source link

Flattened fuction broken by `null` #478

Closed sgalles closed 9 years ago

sgalles commented 9 years ago

This code

shared void run(){
    void foo([Integer?] i){}
    flatten(foo)(null);
}

When executed


plugins\com.redhat.ceylon.dist.repo_1.1.1.v20150109-2104\repo\ceylon\language\1.1.1\ceylon.language-1.1.1.js:3225
if (tlast && typeof(last.Args$flatten) === 'object' && (last.Args$flatten.t===
                        ^
TypeError: Cannot read property 'Args$flatten' of null
    at rf (plugins\com.redhat.ceylon.dist.repo_1.1.1.v20150109-2104\repo\ceylon\language\1.1.1\ceylon.language-1.1.1.js:3225:25)
    at run (test42\modules\mymod\1.0.0\mymod-1.0.0.js:15:144)
    at [eval]:1:277
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (module.js:456:26)
    at evalScript (node.js:536:25)
    at startup (node.js:80:7)
    at node.js:906:3