✓
Passing This code compiles and runs correctly.
Code
// PINS: rule 4 of 690_086 for ROW bindings — a nested sweep arm that rebinds
// the outer arm's name shadows it, innermost first. Under the inner arm,
// `k.v` is the INNER store's row; the outer row is unreachable there by
// rule, not by pass order.
//
// Two rows in the outer store, so the inner values printing once per outer
// row is what distinguishes shadowing from the outer binding claiming the
// reads: the outer values (10, 20) must never appear.
import std/io
import std/store
std/store:new(outer, capacity: 4) { v: i64 }
std/store:new(inner, capacity: 4) { v: i64 }
std/store:insert(outer) { v: 10 }
std/store:insert(outer) { v: 20 }
std/store:insert(inner) { v: 1 }
std/store:insert(inner) { v: 2 }
std/store:sweep(outer)
! sweep k |> std/store:sweep(inner)
! sweep k |> std/io:print.ln("k {{ k.v:d }}")
Actual
k 1
k 2
k 1
k 2
Expected output
k 1
k 2
k 1
k 2
Flows
flow ~new click a branch to expand · @labels scroll to their anchor
new (expr: outer, capacity: 4, source: v: i64)
flow ~new click a branch to expand · @labels scroll to their anchor
new (expr: inner, capacity: 4, source: v: i64)
flow ~insert click a branch to expand · @labels scroll to their anchor
insert (expr: outer, source: v: 10)
flow ~insert click a branch to expand · @labels scroll to their anchor
insert (expr: outer, source: v: 20)
flow ~insert click a branch to expand · @labels scroll to their anchor
insert (expr: inner, source: v: 1)
flow ~insert click a branch to expand · @labels scroll to their anchor
insert (expr: inner, source: v: 2)
flow ~sweep click a branch to expand · @labels scroll to their anchor
sweep (expr: outer)
Test Configuration
MUST_RUN