ceylon/ceylon-spec — Issue #159: Null leak with toplevel attributes in different units
Author: gavinking
Created: 2012-02-04 13:01:58+00:00
State: open
Labels: bug, clarification, high priority

In one unit:

String y = x;

void runit() {
print(y.size);
}

In a second:

String xx = yy;

The output:

```
Exception in thread "main" java.lang.NullPointerException
at ceylon.language.String.getSize(String.java:119)
at runit.runit(toplevelx.ceylon:4)
at runit.main(toplevelx.ceylon)
```

See the related discussion in #121.

We need the language spec to decide what is the right set of restrictions to apply here.