Class HasRealComparator
- All Implemented Interfaces:
Predicate<IAggregateSymbol>
<=> operator, one it
declares itself or inherits from a real (user) super, as opposed to only the degenerate Any._cmp
that EVERY type inherits and which is not value ordering.
It walks the super chain with resolveInThisScopeOnly (declared-at-that-level only) and stops
BEFORE Any. This is exactly why a direct list <=> list is rejected with E07620: List
declares no <=> and Any._cmp does not count. Used to decide whether a default operator
comparison (<=>,<,<=,>,>=) can be produced over a field of this type - reuse this, do not re-derive
the "excludes Any._cmp" walk. Construct once with the resolved Any type.
This is now a thin "<=>" specialisation of HasRealOperator - the same walk generalised
to any operator glyph (used for ==/$/#? by the equals/toString/hashCode
generators). Kept as a named signpost because phase3/phase5 orderability checks refer to
"the comparator predicate".
D55 (2026-10-20): a <=> the BARE default operator added counts only where it survives phase 5
(OrderingAvailability.orderingSurvives(MethodSymbol, ISymbol)) - its own fields orderable and the <=> above it surviving
too. Before, a Holder whose field was such a Base kept its own bare <=>, and that called
Base._cmp(Base), which phase 5 had retracted: a NoSuchMethodError at run time. The rule itself lives
in Sameness; this class is its predicate form.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanallPropertiesOrderable(IAggregateSymbol aggregate) THE test that every property of the type has a REAL<=>(test(IAggregateSymbol)) - so a BAREdefault operator's<=>over them survives.booleantest(IAggregateSymbol type)
-
Constructor Details
-
HasRealComparator
-
-
Method Details
-
test
- Specified by:
testin interfacePredicate<IAggregateSymbol>
-
allPropertiesOrderable
THE test that every property of the type has a REAL<=>(test(IAggregateSymbol)) - so a BAREdefault operator's<=>over them survives. Where one does not, phase 5 (DefaultComparatorRecheckOrError) retracts the bare ordering operators, and the type is equatable only.
-