✓
Passing This code compiles and runs correctly.
Code
// TEST: MUST_FAIL - Nominal int types are distinct
//
// UserId and ProductId are both ints, but Koru should reject
// passing one where the other is expected.
//
// Expected: Compilation error - type mismatch
~import "$std/types"
~int(UserId)
~int(ProductId)
~event get_user { id: UserId }
| found []const u8
~proc get_user {
return .{ .found = "Alice" };
}
~event main {}
~proc main {
// ERROR: Passing ProductId where UserId is expected
const pid: ProductId = 42;
~get_user(id: pid)
| found |> done {}
}
~main()
Error Verification
Expected Error Pattern
MUST_FAILActual Compiler Output
🎯 Compiler coordination: Passes: 13 (flow-based: frontend, analysis, emission)
Error: output_emitted.zig:23:24: error: use of undeclared identifier '__inline_flow_1'
return __inline_flow_1(.{ });
^~~~~~~~~~~~~~~Test Configuration
MUST_FAIL
Expected Behavior:
CONTAINS type mismatch