059 sibling arms disjoint scopes

✓ Passing This code compiles and runs correctly.

Code

input.k

Actual

echo: f hit
t1 result
echo: f hit
t2 result
t3 refused 'u' is already bound by an enclosing arm — this bind would shadow it, and Koru has no shadowing; pick a new name
echo: hit miss
t4 result
echo: again hit
t5 result

Expected output

echo: f hit
t1 result
echo: f hit
t2 result
t3 refused 'u' is already bound by an enclosing arm — this bind would shadow it, and Koru has no shadowing; pick a new name
echo: hit miss
t4 result
echo: again hit
t5 result

Flows

flow ~register click a branch to expand · @labels scroll to their anchor
register (scope: "binds", source: probe(1) echo(1))
subflow ~turn1 click a branch to expand · @labels scroll to their anchor
run (br, source: "probe(path: \"hit\")\n| found p |> echo(text: \"f {{ p }}\")\n| absent p |> echo(text: \"a {{ p }}\")")
subflow ~turn2 click a branch to expand · @labels scroll to their anchor
run (br, source: "probe(path: \"hit\") | found p |> echo(text: \"f {{ p }}\") | absent p |> echo(text: \"a {{ p }}\")")
subflow ~turn3 click a branch to expand · @labels scroll to their anchor
run (br, source: "probe(path: \"hit\")\n| found u |> probe(path: \"miss\")\n | found u |> echo(text: \"inner\")")
subflow ~turn4 click a branch to expand · @labels scroll to their anchor
run (br, source: "probe(path: \"hit\")\n| found u |> probe(path: \"miss\")\n | found v |> echo(text: \"{{ u }} {{ v }}\")\n | absent v |> echo(text: \"{{ u }} {{ v }}\")")
subflow ~turn5 click a branch to expand · @labels scroll to their anchor
run (br, source: "probe(path: \"hit\") | found u |> echo(text: \"again {{ u }}\")")
flow ~create click a branch to expand · @labels scroll to their anchor
create (id: "b1", scope: "binds")

Test Configuration

MUST_RUN