✓
Passing This code compiles and runs correctly.
Code
// A lifecycle interceptor can carry a MULTI-WRITE body: `removed` here keeps
// two scoreboard fields coherent in one branch (`alive - 1 |> kills + 1`).
// This pins the interceptor impl flow past the emitter gap where a value-
// returning flow head (the first `__store_write`) followed by a void `|>`
// tail leaves an undiscarded `const result`. Single-write interceptors
// (690_016) already work; this is the two-write generalization.
//
// The bodies maintain counts only — they don't read the row — so the payload
// is discarded (`_`); binding a field you never use is rejected (690_032).
import std/io
import std/store
std/store:new(board) { alive: 0[i64], kills: 0[i64] }
std/store:new(pool) { hp: i64 }
! inserted _ |> std/store:stored { board.alive: board.alive + 1 }
! removed _ |> std/store:stored { board.alive: board.alive - 1 } |> std/store:stored { board.kills: board.kills + 1 }
std/store:watch(board)
! alive a |> std/io:print.ln("alive {{ a:d }}")
! kills k |> std/io:print.ln("kills {{ k:d }}")
std/store:insert(pool) { hp: 1 }
| row b |> std/store:take(pool[b])
| item _ |> _
Actual
alive 1
alive 0
kills 1
Expected output
alive 1
alive 0
kills 1
Flows
flow ~new click a branch to expand · @labels scroll to their anchor
new (expr: board, source: alive: 0[i64], kills: 0[i64])
flow ~new click a branch to expand · @labels scroll to their anchor
new (expr: pool, source: hp: i64)
flow ~watch click a branch to expand · @labels scroll to their anchor
watch (expr: board)
flow ~insert click a branch to expand · @labels scroll to their anchor
insert (expr: pool, source: hp: 1)
Test Configuration
MUST_RUN