✓
Passing This code compiles and runs correctly.
Code
// MIRROR of 660_003_list_len_in_expr: `std/list:new` with a push, a len read in
// an interpolation expression, and a free, relocated into an imported module.
//
// The list handle carries an obligation, so this also pins that a discharge
// chain stays intact when the whole flow is a module tor body rather than a
// top-level statement.
import app/lib
app/lib:run()
Supporting Files
import std/io
import std/list
pub tor run {}
run = std/list:new(i64)
| list xs |> std/list:push(xs, v: 7) |> std/list:len(xs): n |> std/io:print.ln("{{ n + 10:d }}") |> std/list:free(xs)
| err e |> std/io:print.ln("ERR {{ e:s }}")
Actual
11
Expected output
11
Flows
flow ~run click a branch to expand · @labels scroll to their anchor
run
Test Configuration
MUST_RUN