Class NotImplicitSuper

java.lang.Object
org.ek9lang.compiler.phase7.support.NotImplicitSuper
All Implemented Interfaces:
Predicate<ISymbol>

public class NotImplicitSuper extends Object implements Predicate<ISymbol>
THE single predicate for "does this super type need an EK9-style super-init call emitted by the IR?". Reuse this - do NOT re-derive a variant (see CLAUDE.md 'Single-Source-of-Truth Helpers').

Returns true when the super is a real EK9 super whose c_init/<init> the IR must call; false when the super is an implicit base the IR must skip because the back-end supplies the constructor call directly:

  • SymbolGenus.ANY - Any is a JVM interface, so the JVM super is java/lang/Object; the back-end injects Object.<init> (no EK9 super-init).
  • a parameterisation of an externally-implemented (built-in) generic - e.g. _Iterator_<Integer>, _Acceptor_<X> - whose JVM super is the Java BuiltinType with a no-arg <init> the back-end injects directly.

The back-end SuperConstructorAsmGenerator.needsSuperCallInjected MIRRORS this exactly (it injects a super call iff this returns false), so any divergence produces double- or missing-super-init VerifyErrors. Type identity is therefore taken from symbol genus + squirrelled EXTERN data (via ExternallyImplemented) - never FQN string matching.

  • Constructor Details

    • NotImplicitSuper

      public NotImplicitSuper()
  • Method Details