✓
Passing This code compiles and runs correctly.
Code
// PIN (enforcement): freeing a String twice is use-after-discharge.
~import std/string
~std/string:from-page(text: "hello")
| ok s |> std/string:free(s) |> std/string:free(s)
| err _ |> _
Must contain:
Use-after-dischargeError Verification
Actual Compiler Output
error[KORU030]: Use-after-discharge: binding 's' was already discharged and cannot be used
--> phantom_semantic_check:5:0
❌ Compiler coordination error: Phantom semantic validation failed
error: CompilerCoordinationFailed
/Users/larsde/src/koru/tests/regression/600_STDLIB/610_STRING/610_006_reject_double_free/backend.zig:94:13: 0x10523a3b3 in emit (backend)
return error.CompilerCoordinationFailed;
^
/Users/larsde/src/koru/tests/regression/600_STDLIB/610_STRING/610_006_reject_double_free/backend.zig:190:28: 0x10523b09f in main (backend)
const generated_code = try RuntimeEmitter.emit(compile_allocator, final_ast);
^Test Configuration
MUST_FAIL