✓
Passing This code compiles and runs correctly.
Code
const Connection = struct { id: i32 };
~pub event connect { url: []const u8 }
| ok *Connection<!connected>
~proc connect|zig {
return .{ .ok = undefined };
}
Must contain:
Cannot consume obligationError Verification
Expected Error Pattern
Cannot consume obligationActual 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:94:13: 0x1051a338b 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:190:28: 0x1051a4077 in main (backend)
const generated_code = try RuntimeEmitter.emit(compile_allocator, final_ast);
^Test Configuration
MUST_FAIL