018 list ref no home refused

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

Code

input.k

Actual compiler output

error[KORU173]: std/list:new(Owner): field 'dog' is ref(Dog) but no store holds Dog rows — a ref field needs a home: a plural store whose row carries the target's fields (std/store:new(dogs, capacity: N) { Dog }); without one the field can only ever hold -1
  --> tests/regression/600_STDLIB/698_OOP/698_018_list_ref_no_home_refused/input.k:16: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 (Dog, source: hp: i64)
flow ~std/proto click a branch to expand · @labels scroll to their anchor
std/proto (Owner, source: name: string dog: ref(Dog))
flow ~new click a branch to expand · @labels scroll to their anchor
new (Owner)

Test Configuration

MUST_ERROR