✗
Failing This test is currently failing.
Failed: backend-exec
Failure Output
error[KORU164]: ~capture requires a seed block: capture { field: value }
--> tests/regression/000_CORE_LANGUAGE/035_TYPE_SYSTEM/030_121_instantiate_with_named_type/input.kz:15:0 Code
// Registry breakdown #2: a stamped type inside a CAPTURE CELL. The
// cell must NAME the generated type's identity rather than leaking the
// raw Zig type. With stamped names the cell
// type is just the name. Spelling PROVISIONAL (capture-cell typing of
// a Koru-minted type is itself part of the ask).
~import std/types
~import std/io
~import std/control
~std/types:struct(acc#i64) {
total: i64,
}
~capture({ a: acc#i64{ .total = 0 } })
| as state |> for(&[_]i64{ 10, 20, 30 })
| each n => captured { a: acc#i64{ .total = state.a.total + n } }
| captured final |> std/io:print.ln("Total: {{ final.a.total:d }}")
Must contain:
Total: 60Flows
flow ~struct click a branch to expand · @labels scroll to their anchor
struct (expr: acc#i64, source: total: i64,)
flow ~capture click a branch to expand · @labels scroll to their anchor
capture ({ a: acc#i64{ .total = 0 } })
Test Configuration
MUST_RUN