132 generic type mismatch

✓ Passing This code compiles and runs correctly.

Code

// TEST: MUST_FAIL - Instantiated generics with different params are distinct
//
// Option<i32> and Option<f32> are different types.
// Koru should reject passing one where the other is expected.
//
// Expected: Compilation error - type mismatch

~import "$std/types"

~struct(Option<T>) { some: T, none }
~type(OptionalInt = Option<i32>)
~type(OptionalFloat = Option<f32>)

~event process_int { val: OptionalInt }
| done {}

~proc process_int {
    return .{ .done = .{} };
}

~event main {}
| done {}

~proc main {
    // ERROR: Passing OptionalFloat where OptionalInt is expected
    const f = OptionalFloat{ .some = 3.14 };
    ~process_int(val: f)
    | done |> done {}
}

~main()
| done |> _
input.kz

Error Verification

Expected Error Pattern

MUST_FAIL

Actual Compiler Output

🎯 Compiler coordination: Passes: 13 (flow-based: frontend, analysis, emission)
Error: output_emitted.zig:31:33: error: expected ')', found ':'
                ~process_int(val: f)
                                ^

Test Configuration

MUST_FAIL

Expected Behavior:

CONTAINS type mismatch