Class DefaultComparatorRecheckOrError

java.lang.Object
org.ek9lang.compiler.phase5.DefaultComparatorRecheckOrError
All Implemented Interfaces:
Consumer<AggregateSymbol>

final class DefaultComparatorRecheckOrError extends Object implements Consumer<AggregateSymbol>
PRE_IR_CHECKS confirm-or-retract for the BARE default operator comparison family.

Phase 1 optimistically adds the full default set (including <=>,<,<=,>,>=) before field types are known. By this phase every field type is resolved, so this rechecks: if a field's type is NOT orderable (has no real <=> of its own - only the degenerate inherited Any._cmp), the bare-inferred comparison operators cannot be produced and are RETRACTED (squirrelled DEFAULT_OPERATOR_RETRACTED, which AggregateSymbol.getAllMethodInThisScopeOnly filters out) - as if the catch-all had never added them. ==/<> (equality, _eq-backed) stay. The EXPLICIT form (default operator <=>) is NOT handled here - it is an error at FULL_RESOLUTION (DefaultOperatorsOrError). A later use of a retracted operator is reported by RetractedComparatorUseOrError. See project_default_operator_cmp_capability.