✓
Passing Passing: the compiler rejects this program as expected.
Code
// PINS: what a LIFECYCLE arm's request block refuses, and that each refusal
// says WHICH KIND of no it is — the distinction 690_248 established.
//
// `[ordinal]` is MEANINGLESS here and says so: a birth or a death is one row's
// event, not a position in a walk. That is not a rung, and a later slice must
// not "add" it.
//
// (`[row]` is refused separately as NOT BUILT rather than meaningless — the
// arm already is about one row, and binding it to reach columns the payload
// does not pun is a real thing that simply is not this rung. Keeping the two
// refusals distinct is the whole point: "meaningless here" must never read as
// "unimplemented here".)
import std/io
import std/store
std/store:new(rows, capacity: 4) { v: i64 }
! inserted { v, [ordinal]n } |> std/io:print.ln("v={{ v:d }} n={{ n:d }}")
std/store:insert(rows) { v: 1 }
| row _ |> _
| full |> _
Actual compiler output
error[KORU161]: std/store:new(rows): `[ordinal]n` on a `! inserted` arm - a lifecycle arm fires on ONE row's birth or death and has no traversal, so there is no position in a walk to name (this is not unimplemented; it is meaningless here). `[ordinal]` is a sweep request: `! query { [row]r, [ordinal]n }`
--> tests/regression/600_STDLIB/690_STORE/690_264_lifecycle_arm_refuses_ordinal_and_row/input.k:16:0Compiler must reject:
Compilation must fail with a diagnostic.
Flows
flow ~new click a branch to expand · @labels scroll to their anchor
new (rows, capacity: 4, source: v: i64)
flow ~insert click a branch to expand · @labels scroll to their anchor
insert (rows, source: v: 1)
Test Configuration
MUST_ERROR