✓
Passing This code compiles and runs correctly.
Code
// PINS: a rule arm's `when` guard reads a FOREIGN singleton's cell — the
// cross-store read lowers to the store object, not raw surface text. The
// guard is baked into host text inside create, before the whole-program
// walk runs, so the cell rewrite must happen at the bake site — the same
// read already lowered fine in insert seeds (690_192), body-if conditions
// (690_074) and fmt interpolations; the guard was the position that missed.
// Both polarities: the true guard fires its arm, the false one filters.
import std/io
import std/store
std/store:new(rows, capacity: 4) { id: i64 }
std/store:new(op) { code: 1[i64] }
std/store:insert(rows) { id: 7 }
std/store:rule(rows)
! row e when op.code == 1 |> std/io:print.ln("hit {{ e.id:d }}")
std/store:rule(rows)
! row e when op.code == 2 |> std/io:print.ln("miss {{ e.id:d }}")
Actual
hit 7
Expected output
✓ Zig✓ JavaScripthit 7
Flows
flow ~new click a branch to expand · @labels scroll to their anchor
new (expr: rows, capacity: 4, source: id: i64)
flow ~new click a branch to expand · @labels scroll to their anchor
new (expr: op, source: code: 1[i64])
flow ~insert click a branch to expand · @labels scroll to their anchor
insert (expr: rows, source: id: 7)
flow ~rule click a branch to expand · @labels scroll to their anchor
rule (expr: rows)
flow ~rule click a branch to expand · @labels scroll to their anchor
rule (expr: rows)
Test Configuration
MUST_RUN