✓
Passing This code compiles and runs correctly.
Code
// Test: effect-branch handler produces an arithmetic resume value with `->`.
// The effect is declared `! double i32 -> i32`, so the arm produces with
// `-> n * 2` — the Zig expression evaluates and is sent back as the resume
// value. `->` is the produce glyph (not `=>`: there are no branches).
~import std/io
~pub event request { payload: i32 }
! double i32 -> i32
| done i32
~proc request|zig {
const result = double(payload);
return .{ .done = result };
}
~request(payload: 21)
! double n -> n * 2
| done r |> std/io:print.blk {
result is {{ r:d }}
}
Actual
result is 42
Expected output
result is 42
Flows
flow ~request click a branch to expand · @labels scroll to their anchor
request (payload: 21)
Test Configuration
MUST_RUN