✓
Passing This code compiles and runs correctly.
Code
// Test shorthand parameter syntax with struct fields
// When passing t.field, should expand to field: t.field (not t.field: t.field)
const std = @import("std");
~event process {
source: []const u8,
branch: []const u8,
destination: ?[]const u8,
}
~proc process|zig {
std.debug.print("source={s} branch={s}\n", .{source, branch});
}
pub const Data = struct {
source: []const u8,
branch: []const u8,
destination: ?[]const u8,
};
// Main flow: Use shorthand syntax (r.source) which should expand to (source: r.source)
~start()
| result r |> process(r.source, r.branch, r.destination)
~event start {}
| result Data
~proc start|zig {
const data = Data{
.source = "test_event",
.branch = "success",
.destination = null,
};
return .{ .result = data };
}
Actual
source=test_event branch=success
Expected output
source=test_event branch=success
Test Configuration
MUST_RUN