Class MarkInheritedRules
java.lang.Object
org.ek9lang.compiler.support.retention.MarkInheritedRules
- All Implemented Interfaces:
BiPredicate<ScopedSymbol, ScopedSymbol>
public final class MarkInheritedRules
extends Object
implements BiPredicate<ScopedSymbol, ScopedSymbol>
THE rules a BODY-LESS dynamic function inherits (option B slice B, Steve 2026-11-13):
intTransformer <- ()
is transformValue of Integer as function has no body of its own, so phase 7 emits its _call as a forward
to its super function with every parameter - the super's body IS what it does with its arguments, and its super's
rules (declared or derived, a parameterised generic's own included - RulesOf) are its rules, parameters
matched by position and named as the dynamic function declares them (CopyRetentionRules, the mirror of
MarkOverriddenBy's UP union: that one climbs only up, so a body-less sub derived nothing and every caller
trusted it - E1a's scenario3SimpleContainer shape). A super declaring the unknown opt-out hands
that down as it is. Only a dynamic function with NO body of its own is given here: one with a body derives from
that body. Run inside both derivation fixpoints (a super that gains a rule on a later pass feeds the sub on the
next); marks only add. Answers true when the sub gained a rule.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleantest(ScopedSymbol sub, ScopedSymbol superFunction) Record every rule ofsuperFunctionon the body-lesssubthat forwards to it.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BiPredicate
and, negate, or
-
Constructor Details
-
MarkInheritedRules
public MarkInheritedRules()
-
-
Method Details
-
test
Record every rule ofsuperFunctionon the body-lesssubthat forwards to it.- Specified by:
testin interfaceBiPredicate<ScopedSymbol, ScopedSymbol>- Returns:
- true when the sub gained a rule
-