✓
Passing This code compiles and runs correctly.
Code
// A `|>` step after `insert` is the rest of the pipeline, not an insert
// branch: the transform must carry it onto the rewritten call. When the
// site has no `| row`/`| full` arm, the rewrite used to replace the site's
// continuations with an empty list and the second insert never ran.
import std/io
import std/store
std/store:new(items, capacity: 8) { v: i64 }
std/store:insert(items) { v: 10 } |> std/store:insert(items) { v: 20 } |> std/io:print.ln("after")
std/store:query(items)
! query e |> std/io:print.ln("v {{ e.v:d }}")
Actual
after
v 10
v 20
Expected output
after
v 10
v 20
Flows
flow ~new click a branch to expand · @labels scroll to their anchor
new (items, capacity: 8, source: v: i64)
flow ~insert click a branch to expand · @labels scroll to their anchor
insert (items, source: v: 10)
flow ~query click a branch to expand · @labels scroll to their anchor
query (items)
Test Configuration
MUST_RUN
koru.json:
{
"paths": {
"std": "../../../../../koru_std"
}
}