✓
Passing Passing: the compiler rejects this program as expected.
Code
// "Never nest `!`": an indented `!` under an effect branch is not a resume
// arm and not legal anywhere — effect composition lives in the flat `|` arm
// list, never in nested effects. Sibling of the accept pins 210_092/093.
~pub tor request { payload: i32 }
! ask i32
! nested i32
| timeout
| done i32
~proc request|zig {
const r = ask(payload);
return .{ .done = r };
}
Actual compiler output
error[PARSE003]: effect branches never nest - composition lives in the '|' resume arms
--> tests/regression/200_COMPILER_FEATURES/210_PARSER/210_136_effect_arms_never_nest_effects/input.kz:6:1
|
6 | ! nested i32
| ^Frontend must reject with:
CONTAINS effect branches never nestTest Configuration
MUST_ERROR