Class DefaultOperatorsOrError
java.lang.Object
org.ek9lang.compiler.common.RuleSupport
org.ek9lang.compiler.common.TypedSymbolAccess
org.ek9lang.compiler.phase3.DefaultOperatorsOrError
- All Implemented Interfaces:
Consumer<AggregateSymbol>
Checks that operators that have been 'defaulted' could actually be implemented.
This is done by checking if any super has a suitable or compatible operators and also that
any properties/fields also have a suitable operator.
All the equality checks really depend on a comparator (<=>) operator. These are the operators that can be defaulted.
All the equality checks really depend on a comparator (<=>) operator. These are the operators that can be defaulted.
"<", "<=", ">", ">=", "==", "<>": "<=>": "?": "$": "$$": "#?": ":=:": "close":Note: The :=: (copy) operator does a shallow copy and does not require field types to have their own :=: operator. A defaulted close is the generated close chain (CloseSteps): it closes only the closeable properties, so neither the super nor a non-closeable property needs a close of its own (a vacuous one, with nothing to close, is E81070 in PRE_IR_CHECKS).
-
Field Summary
Fields inherited from class RuleSupport
errorListener, symbolsAndScopes -
Constructor Summary
ConstructorsConstructorDescriptionDefaultOperatorsOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) -
Method Summary
Methods inherited from class TypedSymbolAccess
emitTypeNotResolvedError, getRecordedAndTypedSymbol, isAlreadyInError, isProcessingScopePure, isPureReassignmentDisallowed, recordATypedSymbol
-
Constructor Details
-
DefaultOperatorsOrError
DefaultOperatorsOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener)
-
-
Method Details
-
accept
- Specified by:
acceptin interfaceConsumer<AggregateSymbol>
-