✓
Passing Passing: the compiler rejects this program as expected.
Code
// PINS: `query(name)` on a capacity-1 VALUE store must name the tier the
// store actually is, not pretend the name is undeclared. The refusal names
// all three spellings — read `game.<field>`, watch `std/store:watch(game)`,
// or declare `capacity: N` for rows — because "unknown plural store" taught
// the agent the name was wrong when the tier was. Measured sub-family of
// KORU161: query() against a declared-but-wrong-tier store.
import std/io
import std/store
std/store:new(game) { entities: 0[i64] }
std/store:query(game) ! row r
|> std/io:print.ln("row {{ r.entities:d }}")
Actual compiler output
error[KORU161]: std/store:query(game): 'game' is a capacity-1 value store - query sweeps a plural container's rows. A value store reads as 'game.<field>' in a step, or watches via `std/store:watch(game)`; to keep rows, declare `std/store:new(game, capacity: N)`
--> tests/regression/600_STDLIB/690_STORE/690_354_query_on_value_store_names_the_tier/input.k:12:0Must contain:
error[KORU161]Flows
flow ~new click a branch to expand · @labels scroll to their anchor
new (game, source: entities: 0[i64])
flow ~query click a branch to expand · @labels scroll to their anchor
query (game)
Test Configuration
MUST_ERROR