ceylon / ceylon-js

DEPRECATED
Apache License 2.0
54 stars 9 forks source link

singleton constructor not initialized #594

Closed sgalles closed 9 years ago

sgalles commented 9 years ago

This code

class Foo{
    shared new foo{}
}
shared void run(){
    print(Foo.foo); 
}

executed outputs <null>

chochos commented 9 years ago

Seems this happens only when the only constructor is a singleton constructor; if you add something like shared new other(){} then Foo.foo works.