✗
Failing This test is currently failing.
Failed: backend-exec
Error Details
output_emitted.zig:52:85: error: type 'i32' does not support field access
Failure Output
Showing last 10 of 11 lines
Error: output_emitted.zig:52:85: error: type 'i32' does not support field access
const nested_result_0 = main_module.add_event.handler(.{ .x = d1.result, .y = c });
~~^~~~~~~
referenced by:
flow0: output_emitted.zig:63:61
main: output_emitted.zig:181:22
4 reference(s) hidden; use '-freference-trace=6' to see all references
output_emitted.zig:65:56: error: type 'i32' does not support field access
@import("std").debug.print("Result: {d}\n", .{d.result});
~^~~~~~~ Code
// Test that demonstrates flow purity concept
// Flows compose events - they don't execute code themselves
// This test verifies the AST structure supports purity tracking on flows
~import "$std/io"
// Pure event
~event add { x: i32, y: i32 }
| done i32
~[pure]proc add {
return .{ .done = x + y };
}
// Flow that composes pure operations
~event calculate { a: i32, b: i32, c: i32 }
| done i32
~calculate = add(x: a, y: b)
| done d1 |> add(x: d1.result, y: c)
| done d2 |> done { result: d2.result }
~calculate(a: 10, b: 20, c: 12)
| done d |> std.io:print.ln("Result: {{ d.result:d }}")
Expected
Result: 42
Test Configuration
MUST_RUN