Class IncompleteConstructorCallOrError
- All Implemented Interfaces:
Consumer<EK9Parser.CallContext>
A private constructor may leave properties unset - the 'default private X()' idiom - because it is meant to be
reached only through this(...) from a constructor that then sets them. Walk 0
(ConstructorFieldInitialisationListener) marks a constructor with the properties it leaves unset
(PropertiesLeftUnset); for a private one this rejects any other way of reaching it - the type
constructing an object of itself, such as blank() <- rtn as Label: Label() or, in a generic,
Holder() of T. Without it the object exists with a property that is a raw null, and the first read of
it - or the generated ? - fails at run time.
this(...) and super(...) are not construction calls (they are steps of a constructor), so they are not checked here: a this(...) to such a constructor is judged where it is made, by what the delegating constructor then sets. An accessible constructor that leaves a property unset is reported at the property instead, and an abstract type is never constructed directly.
-
Field Summary
Fields inherited from class RuleSupport
errorListener, symbolsAndScopes -
Constructor Summary
ConstructorsConstructorDescriptionIncompleteConstructorCallOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) -
Method Summary
Methods inherited from class TypedSymbolAccess
getRecordedAndTypedSymbol, isProcessingScopePure, recordATypedSymbol
-
Constructor Details
-
IncompleteConstructorCallOrError
IncompleteConstructorCallOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener)
-
-
Method Details
-
accept
- Specified by:
acceptin interfaceConsumer<EK9Parser.CallContext>
-