009 unused binding error

✗ Failing This test is currently failing.

Failed: error-output

Failure Output

error[KORU010]: '_' is only legal as the body of a branch handler
  --> tests/regression/200_COMPILER_FEATURES/220_FLOW_CHECKER/220_009_unused_binding_error/input.kz:14:0
    |
 14 | 
    | ^
  hint: '_' has meaning only as `| branch [binding] |> _`. Outside a branch handler body — top-level void chain, split-pipeline tail — `|> _` is meaningless.

Code

input.kz

Must fail at frontend compile:

Parsing or type-checking must reject the program.

Expected compiler error

error[KORU100]: unused binding 'f'
  --> tests/regression/200_COMPILER_FEATURES/220_FLOW_CHECKER/220_009_unused_binding_error/input.kz:14:0
    |
 14 | | opened f |> _
    | ^
  hint: discard the binding using `_` if not needed

Imported Files

fs.kz