045 transform optional terminal noop banned

✓ Passing Passing: the compiler rejects this program as expected.

Code

input.kz

Actual compiler output

error[KORU054]: no-op `_` body on optional terminal branch 'done' — arming an optional outcome only to discard it is pure noise
  --> tests/regression/200_COMPILER_FEATURES/220_FLOW_CHECKER/220_045_transform_optional_terminal_noop_banned/input.kz:23:0
    |
 23 | | done _ |> _
    | ^
  hint: omit the arm entirely — an unarmed optional branch already discards the outcome. A no-op is also a hazard: if 'done' is later promoted to REQUIRED, this arm would silently swallow it instead of surfacing the must-handle error. To act, replace `_` with a real step; to intentionally handle-and-ignore, the branch must be REQUIRED (drop the `?`), not optional.

Must fail at frontend compile:

Parsing or type-checking must reject the program.

Error output must contain

KORU054

Flows

flow ~run click a branch to expand · @labels scroll to their anchor
run

Test Configuration

MUST_ERROR