✓
Passing This code compiles and runs correctly.
Code
// Test: ~if with outer scope bindings
// Verifies that ~if works when:
// 1. It's in a pipeline (not top-level)
// 2. The condition references a continuation binding
~import std/io
const std = @import("std");
// Event that returns a value we can check
~event get-value {}
| result i32
~proc get-value|zig {
return .{ .result = 42 };
}
// Test: ~if in pipeline, condition uses binding from outer continuation
~get-value()
| result r |> if(r > 10)
| then |> std/io:print.ln("Value is greater than 10")
| else |> std/io:print.ln("Value is 10 or less")
Actual
Value is greater than 10
Expected output
Value is greater than 10
Test Configuration
MUST_RUN