Class ControlIsBooleanOrError

All Implemented Interfaces:
Consumer<EK9Parser.ExpressionContext>

final class ControlIsBooleanOrError extends TypedSymbolAccess implements Consumer<EK9Parser.ExpressionContext>
Checks that an expression used as a control (if/else if, while, do/while, a ternary) is a condition: a Boolean, or a type that promotes to one with '#^'. If not emits an error.

isCondition(ISymbol, ISymbol) is THE rule for what a condition may be; assert and require use it too (ExpressionIsBooleanResultOrError). Phase 7 inserts the promotion (phase7.support.BooleanCondition). Front-end rationalisation D1 (Steve, 2026-10-02): before it the controls accepted a promotable type and phase 7 never promoted it (a VerifyError at load), while assert and require demanded exactly Boolean.