033 recv composite kind refused

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

Code

input.k

Supporting Files

lib/res.kz

Actual compiler output

error[KORU161]: std/channel:recv(inbox): kind 'env' carries owned leaves ('Env' fields carry obligations) — `| some v` can't mint per-path debts; consume by `!` arms: `std/channel(inbox) ! env v |> ...`
  --> tests/regression/600_STDLIB/699_CHANNEL/699_033_recv_composite_kind_refused/input.k:18:0

Must fail at runtime with:

CONTAINS owned leaves
CONTAINS arms

Error output must contain

owned leaves

Flows

flow ~std/proto click a branch to expand · @labels scroll to their anchor
std/proto (Env, source: r1: *app/lib/res:Resource<owned!> r2: *app/lib/res:Resource<owned!>)
flow ~new click a branch to expand · @labels scroll to their anchor
new (expr: inbox, capacity: 8, source: env: Env)
flow ~recv click a branch to expand · @labels scroll to their anchor
recv (expr: inbox)

Test Configuration

MUST_ERROR