✗
Failing This test is currently failing.
Failed: frontend
Failure Output
error[PARSE003]: single continuation branch 'alt' carrying a payload is a one-variant tag union — declare the single output as a bare return instead: `-> <type>`
--> tests/regression/000_CORE_LANGUAGE/035_TYPE_SYSTEM/030_133_instantiation_param_mismatch/input.kz:23:1
|
23 | ~event get-altitude {}
| ^ 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
error[PARSE003]: single continuation branch 'alt' carrying a payload is a one-variant tag union — declare the single output as a bare return instead: `-> <type>`
--> tests/regression/000_CORE_LANGUAGE/035_TYPE_SYSTEM/030_133_instantiation_param_mismatch/input.kz:23:1
|
23 | ~event get-altitude {}
| ^Flows
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