✓
Passing This code compiles and runs correctly.
Code
const Connection = struct { id: i32 };
~pub event use_connection { conn: *Connection[connected!] }
~proc use_connection {
}
pub fn main() void {}
Error Verification
Expected Error Pattern
Cannot issue obligationActual Compiler Output ✓ Pattern matched
error[KORU033]: Cannot issue obligation '[connected!]' on input parameter (event: use_connection). Use '[!connected]' to consume an existing obligation, or remove the '!' suffix.
--> phantom_semantic_check:4:0
❌ Compiler coordination error: Phantom semantic validation failed
error: CompilerCoordinationFailed
/Users/larsde/src/koru/tests/regression/300_ADVANCED_FEATURES/330_PHANTOM_TYPES/330_058_reject_issue_on_input/backend.zig:9281:17: 0x104a9a4af in emit (backend)
return error.CompilerCoordinationFailed;
^
/Users/larsde/src/koru/tests/regression/300_ADVANCED_FEATURES/330_PHANTOM_TYPES/330_058_reject_issue_on_input/backend.zig:9365:28: 0x104a9b2b7 in main (backend)
const generated_code = try RuntimeEmitter.emit(compile_allocator, final_ast);
^Test Configuration
MUST_FAIL