✗
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/670_NESTING_SWEEP/670_015_capture_under_capture/backend.zig:190:51: 0x104cc79ef 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: 0x104ccd6ab in main (backend)
const result = root.main() catch |err| {
^
???:?:?: 0x18da2fdff in ??? (???)
???:?:?: 0x0 in ??? (???)
/Users/larsde/src/koru/scripts/regression_lib.sh: line 256: 25204 Abort trap: 6 ./backend output Code
// NESTING SWEEP — capture under POSITION 5: capture cell.
// The construct (an inner capture fold that increments a counter once) is
// nested under the `! as acc` body of an OUTER capture cell. The inner fold
// prints `n=1`; the outer cell's `| captured _` terminal is a no-op.
import std/io
capture { k: 0[i64] }
! as acc |> capture { n: 0[i64] }
! as inner |> captured { n: inner.n + 1 }
| captured r |> std/io:print.ln("n={{ r.n:d }}")
| captured _ |> _
Expected output
n=1
Test Configuration
MUST_RUN