✓
Passing This code compiles and runs correctly.
Code
// ============================================================================
// Test 210_059: Reject tilde invocation after pipe-forward
// A pipe-forward (|>) chains into a continuation body, not a new flow.
// Writing `~call()` after `|>` is nonsensical — if you need to chain
// flows, use a branch binding and invoke from the continuation body.
// ============================================================================
~event greet { name: []const u8 }
|> is not valid Koru
~greet(name: "World")
|>
~farewell(name: "World")
Must fail at frontend compile:
Parsing or type-checking must reject the program.
Expected compiler error
error[KORU010]: stray continuation line without Koru construct
--> tests/regression/200_COMPILER_FEATURES/210_PARSER/210_059_reject_tilde_after_pipe_forward/input.kz:9:1
|
9 | |> is not valid Koru
| ^
error[KORU010]: '|>' cannot start a line
--> tests/regression/200_COMPILER_FEATURES/210_PARSER/210_059_reject_tilde_after_pipe_forward/input.kz:11:0
|
11 | |>
| ^^
hint: '|>' is inline glue, never a line start — it joins a branch handler to its body and chains steps on one line.
• Keep the chain inline regardless of length.
• If a step ends in a multi-line { } block, put the next |> on the same line as that block's closing } : pairwise { ... } |> self { ... }
• Void chains may instead split into separate top-level statements (~A() then ~B()).
• Drop a trailing |> _ if the head already suffices.
Error Verification
Actual Compiler Output
error[KORU010]: stray continuation line without Koru construct
--> tests/regression/200_COMPILER_FEATURES/210_PARSER/210_059_reject_tilde_after_pipe_forward/input.kz:9:1
|
9 | |> is not valid Koru
| ^
error[KORU010]: '|>' cannot start a line
--> tests/regression/200_COMPILER_FEATURES/210_PARSER/210_059_reject_tilde_after_pipe_forward/input.kz:11:0
|
11 | |>
| ^^
hint: '|>' is inline glue, never a line start — it joins a branch handler to its body and chains steps on one line.
• Keep the chain inline regardless of length.
• If a step ends in a multi-line { } block, put the next |> on the same line as that block's closing } : pairwise { ... } |> self { ... }
• Void chains may instead split into separate top-level statements (~A() then ~B()).
• Drop a trailing |> _ if the head already suffices.Test Configuration
MUST_FAIL