✓
Passing Passing: the compiler rejects this program as expected.
Code
// 690_367 — a `|>` at the same indent as a `| row` arm is insert's JOIN
// (400_210's rule: an unnamed `|>` after a step's arms rejoins after the
// dispatch, for every tor). Arm bindings are arm-local — `b` is invisible
// at the join, so `s[b]` cannot resolve there. Attachment stays positional:
// `| row b` dispatches on insert, the step before it.
//
// `s[b]` sits inside std/store's write body, which the core flow checker
// does not read (KORU108 covers core call arguments only), so today the
// refusal is the host's `use of undeclared identifier 'b'` from the
// emitted Zig.
//
// The per-row write this wanted already has a spelling — the arm body:
//
// | row b |> std/store:stored { w.h: a }
// |> std/store:stored { s[b].p: a }
//
// which compiles and prints `p 33554432 v 2` (measured same day).
//
// Surfaced by koru-libs/metal folder.k: the insert-seeding cascade wanted
// `|> stored { res[c8].parent: hf }` after the final `| row` arm.
import std/store
import std/io
std/store:new(w) { h: 0[i64] }
std/store:new(s, capacity: 4) { p: i64, v: i64 }
std/store:insert(s) { p: 0, v: 1 }
| row a |> std/store:insert(s) { p: 0, v: 2 }
| row b |> std/store:stored { w.h: a }
|> std/store:stored { s[b].p: a }
std/store:query(s)
! query r |> std/io:print.ln("p {{ r.p:d }} v {{ r.v:d }}")
Actual compiler output
Error: output_emitted.zig:140:95: error: use of undeclared identifier 'b'
_ = main_module.__store_write_s_event.handler(.{ .row = __koru_store_s.__koru_resolve(b), .field = 0, .value_0 = a, .value_1 = 0 });
^Must fail at backend compile:
Code generation must reject the program.
Error output must contain
use of undeclared identifier 'b'Flows
flow ~new click a branch to expand · @labels scroll to their anchor
new (w, source: h: 0[i64])
flow ~new click a branch to expand · @labels scroll to their anchor
new (s, capacity: 4, source: p: i64, v: i64)
flow ~insert click a branch to expand · @labels scroll to their anchor
insert (s, source: p: 0, v: 1)
flow ~query click a branch to expand · @labels scroll to their anchor
query (s)
Test Configuration
MUST_ERROR