✓
Passing This code compiles and runs correctly.
Code
// An [entity] store's `take` mints the taken-obligation; a taken entity with no
// discharger is rejected — the "you can't despawn without saying what despawning
// means" wall. The disposal discipline's teeth, scoped to entity stores (a bare
// store's take is frictionless — see 690_022).
~import std/io
~import std/store
~[entity(enemy)]std/store:new(enemies) { hp: i64 }
~std/store:insert(enemies) { hp: 9 }
| row r |> std/store:take(enemies[r])
| item i |> std/io:print.ln("took hp {{ i.hp:d }}")
Output must match:
MUST_FAIL
BACKEND_RUNTIME_ERROR
CONTAINS obligation
CONTAINS takenError Verification
Actual Compiler Output
error[KORU030]: Resource 'i' obligation <taken!> was not discharged. No event accepts <!taken>.
--> auto_discharge:11:0
❌ Compiler coordination error: Auto-discharge failed (multiple disposal options or no disposal event)
error: CompilerCoordinationFailed
???:?:?: 0x1024939d3 in _backend.RuntimeEmitter.emit (???)
???:?:?: 0x102494b63 in _backend.main (???)Flows
flow ~new click a branch to expand · @labels scroll to their anchor
new (expr: enemies, source: hp: i64)
flow ~insert click a branch to expand · @labels scroll to their anchor
insert (expr: enemies, source: hp: 9)
Test Configuration
MUST_FAIL
Expected Error:
Resource 'i' obligation <taken!> was not discharged. No event accepts <!taken>.