Class IsConditionExpression

java.lang.Object
org.ek9lang.compiler.support.IsConditionExpression
All Implemented Interfaces:
Predicate<EK9Parser.ExpressionContext>

public final class IsConditionExpression extends Object implements Predicate<EK9Parser.ExpressionContext>
THE rule for "is this expression a whole CONDITION": the control of an if/else if/switch head, of a while, or the expression of a require or assert.

It stops the flow checks (always true / always false, redundant set and empty checks) reporting on general expressions such as assignments and arguments. Every one of them holds one of these and asks it, so the set of condition positions is extended in one place and E08086, E08088 and E08092 cannot disagree about it (F29, 2026-10-20: it was three byte-identical private copies). A check that also judges the conjuncts of a condition builds on this.