Class IRParameterisedDirective

java.lang.Object
org.ek9lang.compiler.directives.ResolutionDirective
org.ek9lang.compiler.directives.IRParameterisedDirective
All Implemented Interfaces:
Directive

public class IRParameterisedDirective extends ResolutionDirective
To be used in EK9 source code to check that the IR generated for parameterized types (generic type wrappers) matches what is expected.

This directive is specifically for validating IR of synthesized wrapper classes/functions that are generated for parameterized types like "List of UserRecord" or "Consumer of UserRecord". Unlike @IR which looks for constructs in the current source file, this directive searches ALL IR modules to find the generated wrapper construct.

 @IR_PARAMETERISED: IR_GENERATION: TYPE: "List of UserRecord": `ConstructDfn: org.ek9.lang::_List_...`
 @IR_PARAMETERISED: IR_GENERATION: FUNCTION: "Consumer of UserRecord": `ConstructDfn: org.ek9.lang::_Consumer_...`
  • Constructor Details

    • IRParameterisedDirective

      public IRParameterisedDirective(DirectiveSpec spec)
      New directive checker for parameterized type IR validation.
  • Method Details

    • type

      public DirectiveType type()
      Description copied from interface: Directive
      What s the type of the directive.