Class NoteOrderingThroughCall

java.lang.Object
org.ek9lang.compiler.phase3.NoteOrderingThroughCall
All Implemented Interfaces:
Consumer<NoteOrderingThroughCall.OrderingCall>

final class NoteOrderingThroughCall extends Object implements Consumer<NoteOrderingThroughCall.OrderingCall>
Records, on each conceptual T a resolved call carries, the ordering step the call is (D91 step 4), so a generic's own <=> that compares its T values through a call is judged as one that compares them directly (D89; read by TypeParameterOrderedInOwnComparison, judged by phase4/ParameterisedTypeOrError, E07188):
  • a call of one of the generic's own methods - on itself or on another value of the same generic over the same parameters (other.itemOrder(this)), an override it declares included - hands every T on to that method's body;
  • a call of a generic function (rankOf(item), its type inferred) hands each T on to the type parameter it is bound to, in the function's body;
  • a T value given to a function delegate (a variable or property holding ordering() of T, or a function a call returned) is taken to be ordered there, whatever the delegate does: what it is cannot be known here (strict, as E06070).
Only the steps from the generic's own <=> are followed, so recording a call anywhere else changes nothing.