✓
Passing This code compiles and runs correctly.
Code
// Test identity branch syntax: | branch Type instead of | branch { field: Type }
// MUST_RUN: Verify identity values flow correctly at runtime
~import std/io
~pub event get-number {}
| value i32
~proc get-number|zig {
return .{ .value = 42 };
}
~pub event get-message {}
| text []const u8
~proc get-message|zig {
return .{ .text = "Hello from identity branch!" };
}
// Test that identity values work correctly
~get-number()
| value n |> std/io:print.ln("Got number: {{ n:d }}")
~get-message()
| text msg |> std/io:print.ln("{{ msg:s }}")
Actual
Got number: 42
Hello from identity branch!
Expected output
Got number: 42
Hello from identity branch!
Test Configuration
MUST_RUN