✓
Passing Passing: the compiler rejects this program as expected.
Code
// `! step` this rung lives on a ONE-OWNED-COLUMN store — the row IS its
// obligation, which is what lets `| complete` retire it. On a store whose
// columns carry no obligation the arm refuses: a `complete` verdict would
// have nothing to drain and no owned row to retire.
import std/io
import std/store
std/store:new(pool, capacity: 4) { hp: i64 }
! step p |> std/io:print.ln("hp {{ p:d }}")
Actual compiler output
error[KORU161]: std/store:new(pool): `! step` this rung lives on a one-owned-column store - the row IS its obligation, which is what lets `| complete` retire it; rows of several columns step later
--> tests/regression/600_STDLIB/690_STORE/690_310_store_step_needs_owned_column/input.k:8:0Must contain:
one-owned-column storeFlows
flow ~new click a branch to expand · @labels scroll to their anchor
new (pool, capacity: 4, source: hp: i64)
Test Configuration
MUST_ERROR