✓
Passing This code compiles and runs correctly.
Code
// TEST: MUST_FAIL - Wrong number of type parameters in instantiation
//
// Pair<A, B> requires two type params, but only one is provided.
// Koru should reject this at compile time.
//
// Expected: Compilation error - wrong number of type parameters
~import "$std/types"
~struct(Pair<A, B>) { first: A, second: B }
// ERROR: Pair needs 2 type params, only 1 provided
~type(BadPair = Pair<i32>)
~event main {}
| done {}
~proc main {
return .{ .done = .{} };
}
~main()
| done |> _
Error Verification
Expected Error Pattern
MUST_FAILActual Compiler Output
🎯 Compiler coordination: Passes: 13 (flow-based: frontend, analysis, emission)
Error: output_emitted.zig:14:29: error: use of undeclared identifier 'B'
first: i32, second: B
^Test Configuration
MUST_FAIL
Expected Behavior:
CONTAINS type parameter