Class MethodOverridesOrError
- All Implemented Interfaces:
Consumer<AggregateSymbol>
A method overrides a parent's method only when it has EXACTLY the same signature - the same name and exactly the
same parameter types in order (MethodSymbol.hasSameSignatureAs(MethodSymbol); a covariant return is allowed). Then, and
only then, 'override' is required, and the parent's contract (access, return covariance, 'pure', 'sanitized') binds
it. A method with the same name but other parameter types is a new OVERLOAD, so 'override' on it is E05110
(Steve, 2026-10-02). Until then this matched parents by call COST, so override process(Triangle) beside a
parent process(Shape) compiled as an "override" - and a call through a parent-typed reference still ran the
parent's body: one object, one argument, two answers (front-end rationalisation N06).
Each parent's declarations come from its getAllEffectiveMethods() - THE collapsed view, where an override
further down a parent's own chain replaces what it overrides.
-
Field Summary
Fields inherited from class RuleSupport
errorListener, symbolsAndScopes -
Constructor Summary
ConstructorsConstructorDescriptionMethodOverridesOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener, ErrorListener.SemanticClassification errorWhenShouldBeMarkedAbstract) Check various aspects of overriding methods. -
Method Summary
Methods inherited from class TypedSymbolAccess
emitTypeNotResolvedError, getRecordedAndTypedSymbol, isProcessingScopePure, recordATypedSymbol
-
Constructor Details
-
MethodOverridesOrError
MethodOverridesOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener, ErrorListener.SemanticClassification errorWhenShouldBeMarkedAbstract) Check various aspects of overriding methods.
-
-
Method Details
-
accept
- Specified by:
acceptin interfaceConsumer<AggregateSymbol>
-