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.

D55 (Steve, 2026-10-20): a sub-type follows its super. A bare <=> is also retracted when the <=> above it - the one its generated body would call for the inherited fields - is itself retracted, however many levels up: OrderingAvailability.orderingSurvives(MethodSymbol, ISymbol) is THE decision, shared with phase 3's E07186, E07190 and E07238. The type keeps ==, <> and #?, built on the super's ==.

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.