Class IsClassInheritedFromSuperChain

java.lang.Object
org.ek9lang.compiler.phase7.calls.IsClassInheritedFromSuperChain
All Implemented Interfaces:
BiPredicate<ISymbol,ISymbol>

final class IsClassInheritedFromSuperChain extends Object implements BiPredicate<ISymbol,ISymbol>
THE test, for a chained call (ChainedCallDispatch), of whether definingType is a strict ancestor of receiverType through the CLASS super-chain (IAggregateSymbol.getSuperAggregate() - class inheritance only; traits are NOT on this chain). This is the signal that a DIRECT (non-virtual) call reaches a body that native emits only on the defining class (no subclass copy), so the call must name that class rather than the receiver that merely inherits it. A trait method is materialised on every implementing class, so it is excluded here and stays on the receiver.
  • Constructor Details

    • IsClassInheritedFromSuperChain

      IsClassInheritedFromSuperChain()
  • Method Details

    • test

      public boolean test(ISymbol receiverType, ISymbol definingType)
      True iff definingType is a strict class ancestor of receiverType.
      Specified by:
      test in interface BiPredicate<ISymbol,ISymbol>
      Parameters:
      receiverType - the receiver's static type
      definingType - the type that declares the method called