✗
Failing This test is currently failing.
Failed: frontend
Failure Output
error[KORU104]: nested call in captured field 'n' — calls are not expressions; use tor chaining: bind the result first
--> tests/regression/100_PARSER/100_089_captured_field_swallows_tor_line/input.k:17:4
|
17 | ! line _ |> captured {
| ^
hint: rewrite as `tor(args): x |> ...` and use `x` here Code
// PINS: a tor line inside a `captured { }` field body is REFUSED — the
// field-value scanner may not swallow a following `!` / `|>` line as
// expression continuation. Sibling of 100_083 (unclosed paren in a
// capture value): same silent-absorption failure mode, different door —
// this one is a tor line, not a stray bracket.
//
// Found by the composition GP fuzzer: a spliced `! row` subtree inside
// `captured {}` compiled green under --deep-check while the emitted Zig
// carried the Koru line verbatim — `acc.n = acc.n + 1\n! bogus e |> ...` —
// which is not parseable Zig. `zig ast-check` fails on the emission; the
// "pass" was a frontend that accepted what it never checked.
import std/io
import std/fs
capture { n: 0[i64] }
! as acc |> std/fs:read-lines(path: "nonexistent.txt")
! line _ |> captured {
n: acc.n + 1
! bogus e |> std/io:print.ln("x")
}
| captured total |> std/io:print.ln("{{ total.n:d }}")
Actual compiler output
error[KORU104]: nested call in captured field 'n' — calls are not expressions; use tor chaining: bind the result first
--> tests/regression/100_PARSER/100_089_captured_field_swallows_tor_line/input.k:17:4
|
17 | ! line _ |> captured {
| ^
hint: rewrite as `tor(args): x |> ...` and use `x` hereMust contain:
error[KORU164]Flows
flow ~capture click a branch to expand · @labels scroll to their anchor
capture (source: n: 0[i64])
Test Configuration
MUST_ERROR