Class ConstructorThisEscapeOrError

All Implemented Interfaces:
BiConsumer<EK9Parser.ParamExpressionContext, ISymbol>

final class ConstructorThisEscapeOrError extends TypedSymbolAccess implements BiConsumer<EK9Parser.ParamExpressionContext, ISymbol>
Inside a constructor body, 'this' must not be passed as an argument to any NON-PURE call.

Eliminates publication-during-construction races: if 'this' escapes to a thread-spawning receiver (or any receiver that retains the reference) before the constructor has finished initialising fields, another thread can observe partially-initialised state.

Passing 'this' to a PURE receiver is permitted — pure functions have no observable side effects (no global writes, no thread spawning, no retained references), so they cannot leak the reference. This allows the Consumer-based delegated-initialisation pattern (e.g., a pure constructor accepting a Consumer of T as pure and calling initializer(this)).

Part of EK9's compile-time data-race detection (slice 1, model rule §3.5). Error E08250 THIS_ESCAPES_CONSTRUCTOR.