016 proto ref no home refused

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

Code

input.k

Actual compiler output

error[KORU161]: std/store:new(refs): field 'g' is ref(Ghost) but no store holds Ghost rows — a ref column needs a home: a container store whose row carries the target's fields (std/store:new(dogs, capacity: N) { Dog }); without one the column can only ever hold -1
  --> tests/regression/600_STDLIB/698_OOP/698_016_proto_ref_no_home_refused/input.k:12:0

Compiler must reject:

Compilation must fail with a diagnostic.

Flows

flow ~std/proto click a branch to expand · @labels scroll to their anchor
std/proto (Ghost, source: hp: i64)
flow ~new click a branch to expand · @labels scroll to their anchor
new (refs, capacity: 4, source: g: ref(Ghost))

Test Configuration

MUST_ERROR