✓
Passing This code compiles and runs correctly.
Code
// Test: Branch payload can be discarded with '_'
//
// When a branch has a payload, the handler must bind it or explicitly discard it.
// This test verifies the discard case is accepted.
const std = @import("std");
~tor compute { x: i32 } -> i32
~tor finish {}
~proc compute|zig {
return x * 2;
}
~proc finish|zig {
std.debug.print("done\n", .{});
}
~compute(x: 42): _ |> finish()
Actual
done
Expected output
done
Flows
flow ~compute click a branch to expand · @labels scroll to their anchor
compute (x: 42)
Test Configuration
MUST_RUN