✓
Passing This code compiles and runs correctly.
Code
// RED PIN (type-system design walk, 2026-07-06/07). Intent kept
// (nominal primitive types as event parameters), dead `~const(...) |
// as` form replaced with the flat const declaration (decls are
// module-scope, visible to sibling flows). Under the registry design,
// Username/UserId are registry entries and the call-site argument
// types are checked against them at the Koru layer.
~import std/types
~import std/io
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 });
}
~const { user: "alice", uid: 42 }
~greet-user(name: user, id: uid)
Actual
Hello alice (ID: 42)
Must contain:
Hello alice (ID: 42)Flows
flow ~string click a branch to expand · @labels scroll to their anchor
string (Username)
flow ~int click a branch to expand · @labels scroll to their anchor
int (UserId)
flow ~const click a branch to expand · @labels scroll to their anchor
const (source: user: "alice", uid: 42)
flow ~greet-user click a branch to expand · @labels scroll to their anchor
greet-user (name: user, id: uid)
Test Configuration
MUST_RUN