Package org.ek9lang.compiler.phase5
Class SuitablePropertyInitialisationOrError
java.lang.Object
org.ek9lang.compiler.common.RuleSupport
org.ek9lang.compiler.common.TypedSymbolAccess
org.ek9lang.compiler.phase5.SuitablePropertyInitialisationOrError
- All Implemented Interfaces:
Consumer<org.antlr.v4.runtime.tree.ParseTree>
class SuitablePropertyInitialisationOrError
extends TypedSymbolAccess
implements Consumer<org.antlr.v4.runtime.tree.ParseTree>
Used with aggregates to check that is they have any properties that are not initialised at declaration
there are no default or implicit constructors being used.
This is to make the use of uninitialised properties 'more painful' and to draw attention to the fact that
there are sometimes (but not always) better ways.
This should cause the EK9 developer to consider alternatives and if they still believe this to be the best
solution to consider initialisation inside a Constructor.
This is not mandatory, but is very likely to lead to defects, so this is an attempt at making this issue more
obvious.
-
Field Summary
Fields inherited from class org.ek9lang.compiler.common.RuleSupport
errorListener, symbolsAndScopes
-
Constructor Summary
ConstructorDescriptionSuitablePropertyInitialisationOrError
(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) -
Method Summary
Methods inherited from class org.ek9lang.compiler.common.TypedSymbolAccess
getRecordedAndTypedSymbol, isProcessingScopePure, recordATypedSymbol
-
Constructor Details
-
SuitablePropertyInitialisationOrError
SuitablePropertyInitialisationOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener)
-
-
Method Details