✓
Passing This code compiles and runs correctly.
Code
// MIRROR of 645_001_char_single: `std/switch:char` dispatch relocated into an
// imported module.
//
// Site-local like io — the char dispatch rewrites its own invocation into the
// arms it was given. Second control arm: two independent site-local libraries
// agreeing that relocation is a no-op is what makes a synthesizing library's
// failure attributable to synthesis rather than to modules in general.
import app/lib
app/lib:run()
Supporting Files
import std/switch
import std/io
pub tor run {}
run = std/switch:char('a')
| `a` _ |> std/io:print.ln("got-a")
| `b` _ |> std/io:print.ln("got-b")
| no-match |> std/io:print.ln("other")
Actual
got-a
Expected output
got-a
Flows
flow ~run click a branch to expand · @labels scroll to their anchor
run
Test Configuration
MUST_RUN