ceylon-dart
ceylon-dart copied to clipboard
perform required initialization checks on `late` declarations
For the implementation, we could do one of the following:
- use a
late
indicator value (analogous todartDefault
) for uninitialized values, or - do what the Java backend does: use
null
as the indicator value for non-optionals, and a separateBoolean
for optionals.
For the first, we'd have to use Object
as the type for the underlying value and add casts in exposed getters and setters, but that should be fine.
I consider this low priority since in no way will it impact adoption.
This also affects late
+ specified (memoized) for static and non-static members and toplevels.