Class ValidOperatorOrError
java.lang.Object
org.ek9lang.compiler.common.RuleSupport
org.ek9lang.compiler.phase2.ValidOperatorOrError
- All Implemented Interfaces:
BiConsumer<MethodSymbol, EK9Parser.OperatorDeclarationContext>
final class ValidOperatorOrError
extends RuleSupport
implements BiConsumer<MethodSymbol, EK9Parser.OperatorDeclarationContext>
Checks each operator: first its operator SEMANTICS - arguments, return type and purity, which need resolved types,
so this runs in phase 2 - then what every method and operator declaration is checked for
(
OperationDeclarationChecks, D5). That order is deliberate (Steve, 2026-10-03): only the first error on a
line is kept, so a wrong signature is reported before a missing body, and nobody writes a body for an operator
whose signature is about to change. A method has no semantic checks, so it gets the shared checks in phase 1.
This does not check service operations that are marked as operators.-
Field Summary
Fields inherited from class RuleSupport
errorListener, symbolsAndScopes -
Constructor Summary
ConstructorsConstructorDescriptionValidOperatorOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) Create a new operation checker. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(MethodSymbol methodSymbol, EK9Parser.OperatorDeclarationContext ctx) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BiConsumer
andThen
-
Constructor Details
-
ValidOperatorOrError
ValidOperatorOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) Create a new operation checker.
-
-
Method Details
-
accept
- Specified by:
acceptin interfaceBiConsumer<MethodSymbol, EK9Parser.OperatorDeclarationContext>
-