ceylon / ceylon-js

DEPRECATED
Apache License 2.0
54 stars 9 forks source link

Eager toplevel attributes that throw on evaluation should do so consistently #498

Closed FroMage closed 9 years ago

FroMage commented 9 years ago

See ceylon/ceylon-compiler#2034 for the details. Essentially if you have an eager toplevel attribute that throws (say evaluates to nothing) then it should save and rethrow that exception every time the attribute is read or written to. No writes to the attribute should succeed.

chochos commented 9 years ago

JS initialization works very different from JVM. I can't exactly copy the behavior, but the example in the other issue does throw every time (although subsequent exceptions are really cyclic initialization errors because the toplevel was never properly initialized, because of evaluating nothing).