Class IfStatementOrError

All Implemented Interfaces:
Consumer<EK9Parser.IfStatementContext>

final class IfStatementOrError extends TypedSymbolAccess implements Consumer<EK9Parser.IfStatementContext>
Checks the IfStatement is valid or emits errors.

Every 'if'/'else if' needs a condition: a control, or a guard pre-flow ('<-', ':=?') whose isSet check is the condition (PreFlowCanSkipBody, THE rule for what a guard is). A blind assignment (':=', '=', ':', '+=', ...) or a typed declaration checks nothing, so without 'with <condition>' there is nothing to decide on - the same E07340 a 'switch' gives when its pre-flow cannot be its subject. It once reached IR generation and crashed the compiler.