Class SamenessOrError

All Implemented Interfaces:
Consumer<AggregateSymbol>

final class SamenessOrError extends TypedSymbolAccess implements Consumer<AggregateSymbol>
B18 - a type defines SAMENESS once (Steve, 2026-09-30). The rule is in Sameness; this reports breaches:
  • E07181 - a comparison with the type itself other than its sameness is written, or requested with an explicit default operator: they are always generated (== from <=>, and the rest).
  • E07182 - sameness declared by a type that already inherits one: it is sealed where it is declared, because any subtype refinement of an ordering is non-transitive once base and subtype values mix.
  • E07183 - abstract sameness: sibling implementations would order a mixed collection inconsistently, so the abstraction writes the body over its own abstract accessors.
  • E07184 - a #? that does not go with the sameness (hand-written with hand-written, defaulted with defaulted, inherited with inherited, none without).
Operators added by the BARE default operator are never reported: what the catch-all may produce is decided by synthesis.