✗
Failing This test is currently failing.
Failed: wrong-error
Error Details
output_emitted.zig:80:55: error: expected type 'output_emitted.main_module.Meters', found 'output_emitted.main_module.Feet'
Failure Output
Showing last 10 of 16 lines
^~~~~~
output_emitted.zig:40:20: note: struct declared here
const Meters = struct {
^~~~~~
referenced by:
main: output_emitted.zig:195:22
callMain [inlined]: /opt/homebrew/Cellar/zig/0.15.2_1/lib/zig/std/start.zig:618:22
callMainWithArgs [inlined]: /opt/homebrew/Cellar/zig/0.15.2_1/lib/zig/std/start.zig:587:20
main: /opt/homebrew/Cellar/zig/0.15.2_1/lib/zig/std/start.zig:602:28
1 reference(s) hidden; use '-freference-trace=5' to see all references Code
// RED PIN, MUST_FAIL (type-system design walk, 2026-07-06/07).
// REWRITTEN — the old "wrong arity in Pair<A>" intent belonged to the
// banned parametric grammar. The surviving intent is the deeper one:
// NOMINAL DISTINCTNESS. Two structurally identical declared types are
// DIFFERENT types; cross-use is rejected at the Koru layer citing both
// declarations. Today's scaffolding emits plain Zig aliases, so this
// leaks through silently — which is exactly the old cluster TODO's
// named gap ("without nominal distinctness"), now pinned as a
// rejection.
~import std/types
const std = @import("std");
~std/types:struct(Meters) {
v: i64,
}
~std/types:struct(Feet) {
v: i64,
}
~event get-altitude {}
| alt Feet
~proc get-altitude|zig {
return .{ .alt = Feet{ .v = 30000 } };
}
~event show-meters { m: Meters }
~proc show-meters|zig {
std.debug.print("{d}m\n", .{m.v});
}
// ERROR: Feet where Meters is expected — same shape, distinct types
~get-altitude()
| alt a |> show-meters(m: a)
Backend must reject with:
CONTAINS error[KORU
CONTAINS Meters
CONTAINS FeetError Verification
Expected Error Pattern
MUST_FAILActual Compiler Output
🎯 Compiler coordination: Passes: 15 (flow-based: frontend, analysis, emission)
Error: output_emitted.zig:80:55: error: expected type 'output_emitted.main_module.Meters', found 'output_emitted.main_module.Feet'
_ = main_module.show_meters_event.handler(.{ .m = a });
~^~~~~
output_emitted.zig:43:18: note: struct declared here
const Feet = struct {
^~~~~~
output_emitted.zig:40:20: note: struct declared here
const Meters = struct {
^~~~~~
referenced by:
main: output_emitted.zig:195:22
callMain [inlined]: /opt/homebrew/Cellar/zig/0.15.2_1/lib/zig/std/start.zig:618:22
callMainWithArgs [inlined]: /opt/homebrew/Cellar/zig/0.15.2_1/lib/zig/std/start.zig:587:20
main: /opt/homebrew/Cellar/zig/0.15.2_1/lib/zig/std/start.zig:602:28
1 reference(s) hidden; use '-freference-trace=5' to see all referencesFlows
flow ~struct click a branch to expand · @labels scroll to their anchor
struct (expr: Meters, source: v: i64,)
flow ~struct click a branch to expand · @labels scroll to their anchor
struct (expr: Feet, source: v: i64,)
flow ~get-altitude click a branch to expand · @labels scroll to their anchor
get-altitude
Test Configuration
MUST_FAIL