Class IsClassInheritedFromSuperChain
java.lang.Object
org.ek9lang.compiler.phase7.calls.IsClassInheritedFromSuperChain
- All Implemented Interfaces:
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
True iffdefiningTypeis a strict class ancestor ofreceiverType.- Specified by:
testin interfaceBiPredicate<ISymbol,ISymbol> - Parameters:
receiverType- the receiver's static typedefiningType- the type that declares the method called
-