ceylon-dart icon indicating copy to clipboard operation
ceylon-dart copied to clipboard

perform required initialization checks on `late` declarations

Open jvasileff opened this issue 8 years ago • 2 comments

For the implementation, we could do one of the following:

  1. use a late indicator value (analogous to dartDefault) for uninitialized values, or
  2. do what the Java backend does: use null as the indicator value for non-optionals, and a separate Boolean 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.

jvasileff avatar Oct 16 '16 16:10 jvasileff

I consider this low priority since in no way will it impact adoption.

jvasileff avatar Oct 16 '16 16:10 jvasileff

This also affects late + specified (memoized) for static and non-static members and toplevels.

jvasileff avatar Apr 22 '17 13:04 jvasileff