Class SuperConstructorAccessOrError

All Implemented Interfaces:
Consumer<IAggregateSymbol>

final class SuperConstructorAccessOrError extends TypedSymbolAccess implements Consumer<IAggregateSymbol>
Every EK9 constructor chains to a super constructor: an explicit super(...), an explicit this(...) delegation, or - when neither is written - a hidden IMPLICIT super() to the super's no-arg constructor. Explicit super(...) calls are policed where they are resolved (ThisOrSuperCallOrError - NOT_ACCESSIBLE). This check closes the IMPLICIT hole when the super's no-arg constructor is private (not accessible to a sub-type):
  • The sub-type defines NO constructor at all - the synthetic public no-arg default was therefore suppressed (see AggregateManipulator), so the type is unconstructable. Emit CONSTRUCTOR_REQUIRED_FOR_PRIVATE_SUPER (E07177): the developer must write a constructor that calls an accessible super(...).
  • The sub-type defines a constructor that relies on the hidden implicit super() (a default Sub(), or a body with no explicit super(...)/this(...)) - that developer constructor cannot reach the private super. Emit CONSTRUCTOR_USES_PRIVATE_SUPER (E07176).

This is the mechanism that makes 'default private X()' on a base with an uninitialised property (E07175) actually enforce initialisation in sub-types. Each aggregate is validated purely on its own constructors + its direct super - no inherited-property inspection.