2 ms·
It's completely insurmountable. It basically means you can't call any functions during initialization. Including the one that creates the object you want to poi
by inigyou 5mo ago
It's completely insurmountable. It basically means you can't call any functions during initialization. Including the one that creates the object you want to point your nonnull reference to.
- tsimionescu 5mo ago...which is exactly how value classes and (after this JEP) records work. You are not allowed to call any instance methods before the call to `super()` (which happens implicitly at the end of the constructor for value classes and for records, unless you explicitly call it), and you are not allowed to call `super()` without first setting a value for all of your fields.