✓
Passing This code compiles and runs correctly.
Code
// Test: effect-branch handler produces the binding itself as the resume value.
//
// The effect is declared `! squarify i32 -> i32`, so the arm produces with
// `-> n` — the bare binding `n` echoed back as the resume value. `->` is the
// produce glyph; `=>` would be illegal (the effect has no branches).
~import std/io
~pub event transform { payload: i32 }
! squarify i32 -> i32
| done i32
~proc transform|zig {
const squared = squarify(payload * payload);
return .{ .done = squared };
}
~transform(payload: 7)
! squarify n -> n
| done result |> std/io:print.blk {
result is {{ result:d }}
}
Actual
result is 49
Expected output
result is 49
Flows
flow ~transform click a branch to expand · @labels scroll to their anchor
transform (payload: 7)
Test Configuration
MUST_RUN