orleans state after the turn ends

✓ Passing Passing: the compiler rejects this program as expected.

Code

input.k

Actual compiler output

error[KORU030]: Use-after-discharge: binding 't1' was already discharged and cannot be used
  --> tests/regression/830_THE_WORLD/854_orleans_state_after_the_turn_ends/input.k:37:0

❌ Compiler coordination error: Phantom semantic validation failed
   (set KORU_BACKEND_TRACE=1 for the backend return trace)

Must fail at runtime with:

CONTAINS Use-after-discharge

Flows

flow ~new click a branch to expand · @labels scroll to their anchor
new (grain, capacity: 1, source: count: 0[i64])
subflow ~turn.end click a branch to expand · @labels scroll to their anchor
print.ln (expr: " turn {{ turn:s }} ends")
subflow ~state.bump click a branch to expand · @labels scroll to their anchor
stored (source: grain.count: grain.count + 1)
subflow ~call.blocking click a branch to expand · @labels scroll to their anchor
print.ln (expr: " await {{ target:s }} — non-reentrant, turn held")
flow ~turn.begin click a branch to expand · @labels scroll to their anchor
turn.begin (id: "t1")

Test Configuration

MUST_ERROR