✓
Passing Passing: the compiler rejects this program as expected.
Code
// PIN (enforcement): using a String after free is use-after-discharge
// (610_007: `read` retired — `len` is the borrow-use that remains).
~import std/string
~import std/io
~std/string:from-page(text: "hello")
| ok s |> std/string:free(s) |> std/string:len(s): n |> std/io:print.ln("{{ n:d }}")
| err _ |> _
Actual compiler output
error[KORU030]: Use-after-discharge: binding 's' was already discharged and cannot be used
--> tests/regression/600_STDLIB/610_STRING/610_005_reject_use_after_free/input.kz:7:0
❌ Compiler coordination error: Phantom semantic validation failed
(set KORU_BACKEND_TRACE=1 for the backend return trace)Must contain:
Use-after-dischargeFlows
flow ~from-page click a branch to expand · @labels scroll to their anchor
from-page (text: "hello")
Test Configuration
MUST_ERROR