019 list owned leaf refused

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

Code

input.k

Supporting Files

lib/res.kz

Actual compiler output

error[KORU173]: std/list:new(Env): field 'r1' is owned ('*app/lib/res:Resource<owned!>') — a list has no custody edge to move an obligation across; std/channel is the consumer that transits owned leaves (`send` settles each path, the arm re-mints them)
  --> tests/regression/600_STDLIB/698_OOP/698_019_list_owned_leaf_refused/input.k:14:0

Must fail at runtime with:

CONTAINS owned
CONTAINS custody edge

Error output must contain

custody edge

Flows

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

Test Configuration

MUST_ERROR