✓
Passing Passing: the compiler rejects this program as expected.
Code
// 690_054 — an owned-string column REJECTS an insert whose value does not
// hold the live <std/string:instance!> obligation the column consumes.
// from-page issues <view!>; the synthesized insert param consumes
// <std/string:!instance> — view cannot satisfy instance (the 330_033 /
// 330_067 wall, here at the store boundary). Ownership must be TAKEN
// (std/string:take → <instance!>) before it can move into the store.
import std/io
import std/string
import std/store
std/store:new(names, capacity: 8) { name: *std/string:String<std/string:instance!> }
std/string:from-page(text: "nope")
| ok s |> std/store:insert(names) { name: s }
| row _ |> _
| err _ |> _
Actual compiler output
error[KORU030]: Phantom state mismatch: expected 'std.string:instance' but got 'std.string:view!' for argument 'name'
--> tests/regression/600_STDLIB/690_STORE/690_054_store_reject_bare_obligation_insert/input.k:14:0
❌ Compiler coordination error: Phantom semantic validation failed
(set KORU_BACKEND_TRACE=1 for the backend return trace)Compiler must reject:
Compilation must fail with a diagnostic.
Flows
flow ~new click a branch to expand · @labels scroll to their anchor
new (names, capacity: 8, source: name: *std/string:String<std/string:instance!>)
flow ~from-page click a branch to expand · @labels scroll to their anchor
from-page (text: "nope")
Test Configuration
MUST_ERROR