✓
Passing This code compiles and runs correctly.
Code
// ============================================================================
// Test 210_043: Inline continuation rejected
// Continuations (|) must start on a new line with proper indentation.
// Single-line flows like `event() | branch |> _` are NOT valid Koru.
// ============================================================================
~tor greet { name: string } -> string
~proc greet|zig {
return "Hello!";
}
// INVALID: continuation on same line as invocation
~greet(name: "World") | done |> _
Supporting Files
Must fail at frontend compile:
Parsing or type-checking must reject the program.
Expected compiler error
error[PARSE001]: branch arm '| done' written mid-line — branch arms open on their own line
--> tests/regression/200_COMPILER_FEATURES/210_PARSER/210_043_inline_continuation_rejected/input.kz:14:22
|
14 | ~greet(name: "World") | done |> _
| ^
hint: a `| name` arm dispatches on the step it follows; put it on a new line indented under that step. A same-line next step chains with `|>`.
Error output must contain
branch arm '| done' written mid-line