✗
Failing This test is currently failing.
Failed: backend-exec
Error Details
transform pass failed (TransformPreambleAtNestedSite). The pipeline cannot continue with a partially-transformed AST. Panic: transform pass failed — see error above
Failure Output
Showing last 10 of 66 lines
^
/Users/larsde/src/koru/tests/regression/300_ADVANCED_FEATURES/320_STDLIB/320_034_capture_nested/backend.zig:190:51: 0x102b279ef in main (backend)
const generated_code = try RuntimeEmitter.emit(compile_allocator, final_ast);
^
/opt/homebrew/Cellar/zig/0.15.2_1/lib/zig/std/start.zig:627:37: 0x102b2d6ab in main (backend)
const result = root.main() catch |err| {
^
???:?:?: 0x18da2fdff in ??? (???)
???:?:?: 0x0 in ??? (???)
/Users/larsde/src/koru/scripts/regression_lib.sh: line 256: 75847 Abort trap: 6 ./backend output Code
// FRONTIER (RED — the MULTI-CELL store question, parked): nested capture.
// Spelling migrated to block form 2026-06-12; the SEMANTICS are the open
// design — two live cells means captured { } needs cell ROUTING (which
// write targets which cell), and the single-cell transform rewrites every
// captured in its subtree onto its own cell. Goes green when the store
// design lands (or dies if nested capture is rejected instead).
~import std/io
~import std/control
const std = @import("std");
~event print-int { value: i32 }
~proc print-int|zig {
std.debug.print("{d}\n", .{value});
}
~capture { outer: 0[i32] }
! as outer |> capture { inner: 0[i32] }
! as inner |> captured { inner: inner.inner + 42 }
| captured result |> captured { outer: outer.outer + result.inner }
| captured final |> print-int(value: final.outer)
Expected output
42
Test Configuration
MUST_RUN