✓
Passing This code compiles and runs correctly.
Code
// CONTROL for 115_023: the same `std/store:take` body wrapped in a `pub tor`,
// but left in the ENTRY file. Holds the module constant so tor-wrapping and
// module placement separate as causes for the empty addressing head `take`
// reports for `todos[ui.sel]`.
import std/io
import std/store
std/store:new(todos, capacity: 8) { done: i64 }
std/store:new(ui) { sel: 0[i64] }
pub tor run {}
run = std/store:insert(todos) { done: 0 }
| row _ |> std/store:stored { todos[ui.sel].done: 1 }
|> std/store:take(todos[ui.sel])
| item gone |> std/io:print.ln("done {{ gone.done:d }}")
| empty |> std/io:print.ln("empty")
run()
Actual
done 1
Expected output
done 1
Flows
flow ~new click a branch to expand · @labels scroll to their anchor
new (expr: todos, capacity: 8, source: done: i64)
flow ~new click a branch to expand · @labels scroll to their anchor
new (expr: ui, source: sel: 0[i64])
subflow ~run click a branch to expand · @labels scroll to their anchor
insert (expr: todos, source: done: 0)
flow ~run click a branch to expand · @labels scroll to their anchor
run
Test Configuration
MUST_RUN