026 reuse after send

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

Code

input.k

Actual compiler output

error[KORU030]: Use-after-discharge: binding 's' was already discharged and cannot be used
  --> tests/regression/600_STDLIB/699_CHANNEL/699_026_reuse_after_send/input.k:29:0

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

Must fail at runtime:

Program must error when executed.

Error output must contain

already discharged

Flows

flow ~std/proto click a branch to expand · @labels scroll to their anchor
std/proto (Src, source: id: i64)
flow ~new click a branch to expand · @labels scroll to their anchor
new (expr: inbox, capacity: 8, source: src: Src)
flow ~std/channel click a branch to expand · @labels scroll to their anchor
std/channel (inbox)
flow ~mk click a branch to expand · @labels scroll to their anchor
mk (i: 1)
flow ~create click a branch to expand · @labels scroll to their anchor
create (expr: main)
flow ~std/pump click a branch to expand · @labels scroll to their anchor
std/pump (main)
flow ~run click a branch to expand · @labels scroll to their anchor
run (main)

Test Configuration

MUST_ERROR