059 reject consume on output

✓ Passing This code compiles and runs correctly.

Code

const Connection = struct { id: i32 };
~pub event connect { url: []const u8 }
| ok *Connection[!connected]
~proc connect {
    return .{ .ok = undefined };
}
pub fn main() void {}
input.kz

Error Verification

Expected Error Pattern

Cannot consume obligation

Actual Compiler Output ✓ Pattern matched

error[KORU033]: Cannot consume obligation '[!connected]' on output parameter (event: connect). Use '[connected!]' to issue a new obligation, or remove the '!' prefix.
  --> phantom_semantic_check:5:0

❌ Compiler coordination error: Phantom semantic validation failed
error: CompilerCoordinationFailed
/Users/larsde/src/koru/tests/regression/300_ADVANCED_FEATURES/330_PHANTOM_TYPES/330_059_reject_consume_on_output/backend.zig:9293:17: 0x1020ee4af in emit (backend)
                return error.CompilerCoordinationFailed;
                ^
/Users/larsde/src/koru/tests/regression/300_ADVANCED_FEATURES/330_PHANTOM_TYPES/330_059_reject_consume_on_output/backend.zig:9377:28: 0x1020ef2b7 in main (backend)
    const generated_code = try RuntimeEmitter.emit(compile_allocator, final_ast);
                           ^

Test Configuration

MUST_FAIL