?
Unknown Status unknown.
Code
// TEST: Using nominal types in event pipelines
//
// Define nominal types ~string and ~int, then use them
// as event parameters in a pipeline.
//
// Expected: Compiles and runs with nominal types in events
~import "$std/types"
~import "$std/io"
~import "$std/control"
const std = @import("std");
// Define nominal types
~string(Username)
~int(UserId)
// Event that takes nominal types
~event greet_user { name: Username, id: UserId }
~proc greet_user|zig {
std.debug.print("Hello {s} (ID: {d})\n", .{ name, id });
}
// Use in a pipeline
~const({ user: "alice", uid: @as(i64, 42) })
| as data |> greet_user(name: data.user, id: data.uid)
Actual
Hello alice (ID: 42)
Output must match:
Hello alice (ID: 42)Test Configuration
MUST_RUN