Class DefaultOperatorCoverage

java.lang.Object
org.ek9lang.compiler.support.DefaultOperatorCoverage
All Implemented Interfaces:
BiFunction<IAggregateSymbol, String, Optional<MethodSymbol>>

public final class DefaultOperatorCoverage extends Object implements BiFunction<IAggregateSymbol, String, Optional<MethodSymbol>>
THE test of whether a type already has what a default operator would give it - hold one and apply it, do not re-derive it.

🔑 By SIGNATURE, never by name. A Point with its own ==(Integer) does not have the default ==(Point): the default is still generated beside it, and first == second compiles only because it is (front-end audit FE74, F2 - phase 1 once compared names, and the defaulted <> relying on the missing == crashed code generation). An own operator of that name serves the default only when it can be called with the default's arguments (CallableWithArgumentsOf) - a user's ==(Point) or ==(Any). Inherited operators are not the type's own and are ignored, as the compiler does.

Extracted 2026-09-29 from OperationFactory (the compiler's bare-default completion) so the editors that decline to write a default operator line the type already has (AlreadyDeclaredOperator, AddOperatorEditor) answer exactly as the compiler does; both had compared names.

  • Constructor Details

    • DefaultOperatorCoverage

      public DefaultOperatorCoverage()
  • Method Details