Class DelegatedConstructorInitialisation
java.lang.Object
org.ek9lang.compiler.phase5.DelegatedConstructorInitialisation
- All Implemented Interfaces:
Consumer<EK9Parser.CallContext>
final class DelegatedConstructorInitialisation
extends Object
implements Consumer<EK9Parser.CallContext>
After a this(...) call, the properties the delegated-to constructor sets have a value for the rest of the
delegating constructor - and only those.
Walk 0 (ConstructorFieldInitialisationListener) worked out what each constructor leaves unset through its
own this(...) chain (PropertiesLeftUnset). Marking the rest as safe here, once the call has run, is what
lets the delegating constructor read or use them (E08060), and what keeps the object incomplete - so not usable
(E08061) - when the delegate is a private constructor that set nothing. Before this a this(...) call was taken to
construct the object completely, whatever the delegate set.
-
Constructor Details
-
DelegatedConstructorInitialisation
DelegatedConstructorInitialisation(SymbolsAndScopes symbolsAndScopes)
-
-
Method Details
-
accept
Called once the call (and so its arguments) has been evaluated.- Specified by:
acceptin interfaceConsumer<EK9Parser.CallContext>
-