✓
Passing This code compiles and runs correctly.
Code
// PIN: after `std/string:take(s)` consumes the <view!> binding `s` and
// produces a new <instance!> binding `owned`, the old binding `s` is stale.
// Using `s` in a subsequent call is use-after-discharge: the view! obligation
// was consumed by take, and `s` no longer has a valid phantom state.
//
// The transition take: *String<!view> → | instance *String<instance!>
// is the ATS/Mezzo "transfer" move: ownership moves to a new name.
// The old name is invalid from that point forward.
//
// Grounding:
// - take consuming <!view>: koru_std/string.kz:74
// - take producing instance!: koru_std/string.kz:75
// - from-page/take flow shape: 610_002_string_ownership/input.kz:5-11
// - use-after-discharge shape: 610_005_reject_use_after_free/input.kz:6 (free then read)
import std/string
std/string:from-page(text: "hello")
| ok s |> std/string:take(s): owned |> std/string:read(s): _ |> std/string:free(s: owned)
| 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:18:0
❌ Compiler coordination error: Phantom semantic validation failed
error: CompilerCoordinationFailed
???:?:?: 0x10503b9d3 in _backend.RuntimeEmitter.emit (???)
???:?:?: 0x10503cb63 in _backend.main (???)Flows
flow ~from-page click a branch to expand · @labels scroll to their anchor
from-page (text: "hello")
Test Configuration
MUST_FAIL