✓
Passing Passing: the compiler rejects this program as expected.
Code
// PINS: an insert value ending in an index `xs[0]` fused with the next field
// refuses KORU161 naming the missing comma — not a wrong-arity complaint.
// `xs[0]` is indexing (a `]`-closed value tail), not a `[`-led type prefix.
import std/io
import std/store
std/store:new(ents, capacity: 4) { px: i64, py: i64 }
std/store:insert(ents) { px: xs[0] py: 1 }
std/io:print.ln("unreachable")
Actual compiler output
error[KORU161]: std/store:insert(ents): missing comma — 'py: 1' began a new field but was read as part of the field above it; separate fields with commas
--> tests/regression/600_STDLIB/690_STORE/690_348_store_insert_fused_after_index_refused/input.k:9:0Must fail at runtime with:
CONTAINS error[KORU161]
CONTAINS missing comma
CONTAINS 'py: 1'Flows
flow ~new click a branch to expand · @labels scroll to their anchor
new (ents, capacity: 4, source: px: i64, py: i64)
flow ~insert click a branch to expand · @labels scroll to their anchor
insert (ents, source: px: xs[0] py: 1)
flow ~print.ln click a branch to expand · @labels scroll to their anchor
print.ln (expr: "unreachable")
Test Configuration
MUST_ERROR