○
Planned This feature is planned but not yet implemented.
COMPILER BUG: Inline flows without continuations should return raw Output union
Code
// Test inline flow without explicit continuations
// Inline flow should return the raw Output union that can be switched on directly
const std = @import("std");
// Base event
~event multiply { x: i32, factor: i32 }
| done { result: i32 }
~[pure]proc multiply {
return .{ .done = .{ .result = x * factor } };
}
// Event that uses inline flow WITHOUT continuations
~event double { x: i32 }
| done { result: i32 }
~proc double {
// This should work: inline flow returns Output union directly
const result = ~multiply(x: x, factor: 2)
switch (result) {
.done => |d| return .{ .done = .{ .result = d.result } },
}
}
// Test it
~event main {}
| done {}
~proc main {
const doubled = ~double(x: 21)
switch (doubled) {
.done => |d| {
std.debug.print("Result: {}\n", .{d.result});
},
}
return .{ .done = .{} };
}
~main()
| done |> _