Class GenericBodyReference

java.lang.Object
org.ek9lang.compiler.support.GenericBodyReference

public final class GenericBodyReference extends Object
THE test of whether a parameterised type made inside a generic's body is a dependent (generic-in-generic) reference of that generic: it is parameterised, still generic in nature, and every bare type parameter it names (at any depth: List of List of T) is one of the generic's OWN type parameters. A type naming another generic's 'T' is not this generic's to substitute.

Used by SymbolsAndScopes.resolveOrDefine, the one funnel every inferred parameterisation passes through, so a reference found by inference in FULL_RESOLUTION is recorded exactly as phase 2 records a declared one (and brought through for parameterisations already made: TypeSubstitution.substituteLateReference).

  • Method Details

    • isDependentOf

      public static boolean isDependentOf(PossibleGenericSymbol generic, ISymbol symbol)
      True when the symbol is a dependent reference of the generic - see the class description.