✗
Failing This test is currently failing.
Failed: wrong-error
Error Details
output_emitted.zig:82:55: error: expected type 'output_emitted.main_module.Feet', found 'output_emitted.main_module.Meters'
Failure Output
Showing last 10 of 16 lines
^~~~~~
output_emitted.zig:46:18: note: struct declared here
const Feet = struct {
^~~~~~
referenced by:
main: output_emitted.zig:197: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).
// Binding types checked at the KORU layer against registry entries.
// Today a bind's or branch payload's type is a string the checker can
// pattern-match but not reason about — the true rejection happens in
// Zig, in Zig's voice, pointing at generated code (Lars, 2026-07-06:
// "loosely checked against the translated Koru layer and then rejected
// fully in the Zig layer"). With declared types in the registry, the
// flow/shape checkers resolve binding types and reject HERE, with a
// koru diagnostic naming both declared types.
//
// A produced Meters value bound and passed onward as Feet must be
// rejected by the Koru checker — before any Zig compilation.
~import std/types
const std = @import("std");
~std/types:struct(Meters) {
v: i64,
}
~std/types:struct(Feet) {
v: i64,
}
~event measure {}
| height Meters
~proc measure|zig {
return .{ .height = Meters{ .v = 8848 } };
}
~event report-feet { f: Feet }
~proc report-feet|zig {
std.debug.print("{d}ft\n", .{f.v});
}
~measure()
| height h |> report-feet(f: h)
Backend must reject with:
CONTAINS error[KORU
CONTAINS Meters
CONTAINS FeetError Verification
Actual Compiler Output
🎯 Compiler coordination: Passes: 15 (flow-based: frontend, analysis, emission)
Error: output_emitted.zig:82:55: error: expected type 'output_emitted.main_module.Feet', found 'output_emitted.main_module.Meters'
_ = main_module.report_feet_event.handler(.{ .f = h });
~^~~~~
output_emitted.zig:43:20: note: struct declared here
const Meters = struct {
^~~~~~
output_emitted.zig:46:18: note: struct declared here
const Feet = struct {
^~~~~~
referenced by:
main: output_emitted.zig:197: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 ~measure click a branch to expand · @labels scroll to their anchor
measure
Test Configuration
MUST_FAIL