✓
Passing Passing: the compiler rejects this program as expected.
Code
// PINS: a seed entry with no name — `: 0[i64]` — is a malformed field, not a
// column named ''. The shared field parser refuses it (KORU161) instead of
// letting the empty name downstream into branch-coverage errors.
import std/io
import std/store
std/store:new(tasks, capacity: 4) { : 0[i64], m: 0[i64] }
std/io:print.ln("unreachable")
Actual compiler output
error[KORU161]: std/store:new(tasks): field has no name — a field is `name: value` or a bare punnable name; `: value` dropped the name
--> tests/regression/600_STDLIB/690_STORE/690_347_store_seed_nameless_field_refused/input.k:7:0Must fail at runtime with:
CONTAINS error[KORU161]
CONTAINS field has no nameFlows
flow ~new click a branch to expand · @labels scroll to their anchor
new (tasks, capacity: 4, source: : 0[i64], m: 0[i64])
flow ~print.ln click a branch to expand · @labels scroll to their anchor
print.ln (expr: "unreachable")
Test Configuration
MUST_ERROR