002 effect branch capture shadow

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

Code

input.kz

Actual compiler output

error[KORU106]: 'x' is already bound at line 60 — this bind would shadow it, and Koru has no shadowing
  --> tests/regression/800_CHALLENGES/800_002_effect_branch_capture_shadow/input.kz:61:4
    |
 61 |     | lo x |> sink(v: x)
    |    ^
  hint: give the second bind a different name, or drop it and keep using the one already in scope

Must fail at frontend compile:

Parsing or type-checking must reject the program.

Error output must contain

KORU106

Flows

flow ~run click a branch to expand · @labels scroll to their anchor
run (n: 1)

Test Configuration

MUST_ERROR