✗
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_013_capture_under_effect/backend.zig:190:51: 0x10247b9ef 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: 0x1024816ab in main (backend)
const result = root.main() catch |err| {
^
???:?:?: 0x18da2fdff in ??? (???)
???:?:?: 0x0 in ??? (???)
/Users/larsde/src/koru/scripts/regression_lib.sh: line 256: 25208 Abort trap: 6 ./backend output Code
// NESTING SWEEP — capture under POSITION 3: effect branch.
// capture fold (increments a counter once) nested under the `! line _` effect
// body of read-lines. The input.txt has 5 lines, so the fresh-per-fire fold
// fires 5 times, each producing `n=1` — deterministic output (5 identical
// lines). `| done`/`| failed` are required effect terminals.
import std/io
import std/fs
std/fs:read-lines(path: "tests/regression/810_AOC_2015/810_171_day17_part1/input.txt")
! line _ |> capture { n: 0[i64] }
! as acc |> captured { n: acc.n + 1 }
| captured r |> std/io:print.ln("n={{ r.n:d }}")
| done _ |> _
| failed _ |> _
Expected output
n=1
n=1
n=1
n=1
n=1
Test Configuration
MUST_RUN