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.