✓
Passing This code compiles and runs correctly.
Code
// TEST: Nested tilde invocations should fail
// MUST_ERROR: 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 tor outer {} -> i32
~pub tor inner { x: i32 }
~outer(): d |> ~inner(x: d.value) |> nop()
~pub tor nop {}
Frontend must reject with:
CONTAINS error[PARSE001
CONTAINS Nested flowsExpected compiler error
error[PARSE001]: Nested flows (~) are not allowed inside continuations. Use a bare tor call instead: remove the ~ prefix.
--> tests/regression/100_PARSER/100_070_nested_tilde_invocations/input.kz:16:0
|
16 | ~outer(): d |> ~inner(x: d.value) |> nop()
| ^