Class FlowConditionOrError

All Implemented Interfaces:
Consumer<EK9Parser.ExpressionContext>

final class FlowConditionOrError extends TypedSymbolAccess implements Consumer<EK9Parser.ExpressionContext>
Detects conditions that are always true or always false based on data flow analysis (E08086/E08087).

Unlike the AST-level checkers (E08082-E08085) which detect structural patterns like literal-vs-literal comparisons, this checker uses the ValueTrackingAnalyzer to track variable values through assignments and detect tautological conditions that arise from data flow.

Examples detected:

  • x <- 5; if x == 5 — always true, x is known to be 5
  • x <- 5; if x == 10 — always false, x is known to be 5
  • flag <- true; if flag — always true, flag is known to be true

Exemptions: conditions inside require, assert, and constrain statements are not flagged (same policy as E08082).