✓
Passing Passing: the compiler rejects this program as expected.
Code
// Test: the fleet's member borrow hands out `*Cell<cell>` — read-only
// custody. `std/cell:hibernate` wants `<!cell>` (consume the obligation),
// which only the fleet's index holds, so hibernate on a borrowed cell is a
// compile-time phantom mismatch, not a runtime footgun.
~import std/io
~import std/fleet
~import std/cell
~std/fleet:new(node, scope: "cell", world: "", capacity: 8)
~std/fleet(node.room-42)
| cell b |> std/cell:hibernate(c: b)
| not-found |> std/io:print.ln("missing")
Actual compiler output
error[KORU030]: Phantom state mismatch: 'b' (parameter 'c') holds state 'std.cell:cell' with no obligation attached — '<!cell>' settles a debt, and this value never incurred one.
--> tests/regression/400_RUNTIME_FEATURES/450_FLEET/450_003_borrowed_bridge_cannot_close/input.kz:13:0Must fail at runtime with:
CONTAINS Phantom state mismatch
CONTAINS <!cell>Flows
flow ~new click a branch to expand · @labels scroll to their anchor
new (expr: node, scope: "cell", world: "", capacity: 8)
flow ~std/fleet click a branch to expand · @labels scroll to their anchor
std/fleet (node.room-42)
Test Configuration
MUST_ERROR