Class SamenessOverrideSymbolGenerator

java.lang.Object
org.ek9lang.compiler.phase7.synthesis.SamenessOverrideSymbolGenerator

public final class SamenessOverrideSymbolGenerator extends Object
Creates the DETACHED method symbols a type with its own sameness carries for a comparison through a super-typed reference (D24 rule 3, Sameness.overriddenSignatures(IAggregateSymbol, ISymbol)): one == or <=> override per inherited signature taking a super. Their bodies come from SamenessOverrideGenerator.

As PolymorphicCopySymbolGenerator's carriers, none is ever define()d into the aggregate's scope (F37): method resolution, the call graph, the editors and every E-code see the program as written; a call through a Holder-typed reference still resolves to Holder's ==, and the OBJECT then runs the override (N07). Every IR generator that builds an aggregate's operations list appends these beside the copy carriers - all three must, or a Holder-typed comparison of a Named silently compares the Holder part only.

  • Method Details

    • createFor

      public static List<MethodSymbol> createFor(AggregateSymbol aggregateSymbol, Ek9Types ek9Types)
      The detached overrides for this aggregate - empty for a still-generic template and for a type with no sameness of its own below another.