✓
Passing Passing: the compiler rejects this program as expected.
Code
// PINS: `query(name)` on a declared TOR must name what the name actually is.
// The old miss said "unknown plural store" for every non-store name, which
// taught the agent the name was wrong when the spelling was — a tor is
// called, not swept. KORU161's dominant sub-family (~30 corpus rows) was
// exactly this: query() aimed at a name that exists but isn't a container.
import std/io
import std/store
tor phase { } -> i32
phase -> 1
std/store:query(phase)
! query p |> std/io:print.ln("{{ p:d }}")
Actual compiler output
error[KORU161]: std/store:query(phase): 'phase' is a tor, not a store - query sweeps a plural container's rows. Call 'phase' for its value; if rows were meant, declare `std/store:new(phase, capacity: N)`
--> tests/regression/600_STDLIB/690_STORE/690_355_query_on_tor_names_the_kind/input.k:12:0Must contain:
error[KORU161]Flows
flow ~query click a branch to expand · @labels scroll to their anchor
query (phase)
Test Configuration
MUST_ERROR