✗
Failing This test is currently failing.
Failed: frontend
Failure Output
error[PARSE003]: unbalanced parentheses in invocation arguments
--> tests/regression/200_COMPILER_FEATURES/210_PARSER/210_019_subflow_multiline_call/input.kz:46:1
|
46 | ~test-multiline-call = step-a(x: 10): a |> step-b(
| ^ Code
// ============================================================================
// PARSER BUG: Multi-line function calls in subflows break continuation parsing
// ============================================================================
//
// The parser fails to recognize continuation lines after multi-line function
// calls in subflow expressions. After the closing ')' of a multi-line call,
// the next '|' is treated as a "stray continuation line" instead of being
// recognized as part of the subflow.
//
// Expected: Parser should handle multi-line calls and continue parsing the flow
// Actual: Parser loses track of subflow context after ')'
//
// Do not work around this by moving the event composition into a proc. Procs are
// host/Zig implementation space; this repro exists because the subflow form is
// the intended authoring model.
//
// This bug was discovered while implementing benchmark 2101b_nbody_granular,
// which needed to pass multiple arguments to assemble-solar-system() across
// multiple lines.
//
// ============================================================================
const std = @import("std");
~tor step-a { x: i32 } -> i32
~proc step-a|zig {
return x + 1;
}
~tor step-b { a: i32, b: i32, c: i32 } -> i32
~proc step-b|zig {
return a + b + c;
}
~tor step-c { x: i32 } -> i32
~proc step-c|zig {
return x * 2;
}
// This subflow should work but currently fails
~tor test-multiline-call {} -> i32
~test-multiline-call = step-a(x: 10): a |> step-b(
a,
b: 20,
c: 30
)
| done b |> step-c(x: b)
| done c -> c
// Main flow
~test-multiline-call()
Flows
flow ~test-multiline-call click a branch to expand · @labels scroll to their anchor
test-multiline-call