070 nested tilde invocations

✓ Passing This code compiles and runs correctly.

Code

// TEST: Nested tilde invocations should fail
// MUST_FAIL: Nested flows (~) are not allowed inside continuations
//
// The ~ prefix starts a flow at the top level. Inside a continuation,
// you should use a bare event call instead.
//
// WRONG:  | done d |> ~inner()
// RIGHT:  | done d |> inner()

const std = @import("std");

~pub event outer {}
| done { value: i32 }

~pub event inner { x: i32 }
| done {}

~outer()
| done d |> ~inner(x: d.value)
            | done _ |> nop()

~pub event nop {}
input.kz

Error Verification

Actual Compiler Output

error[PARSE001]: Nested flows (~) are not allowed inside continuations. Use a bare event call instead: remove the ~ prefix.
  --> tests/regression/100_PARSER/100_070_nested_tilde_invocations/input.kz:20:0
    |
 20 | | done d |> ~inner(x: d.value)
    | ^

Test Configuration

MUST_FAIL

Expected Behavior:

FRONTEND_COMPILE_ERROR