✓
Passing Passing: the compiler rejects this program as expected.
Code
// 698_011 — a ref() leaf in a store seed must name a declared compound:
// the column lowers to a row handle, and a handle whose target exists
// nowhere is a lie the seed refuses — same gate the proto layer applies
// to its own ref fields (698_007), at the store's own wall.
import std/store
std/store:new(leashes, capacity: 8) { dog: ref(Nope) }
Actual compiler output
error[KORU161]: std/store:new(leashes): field 'dog' names unknown ref target 'Nope' — ref() takes a declared compound of its home, or a qualified name from another home
--> tests/regression/600_STDLIB/698_OOP/698_011_proto_ref_store_seed_unknown_refused/input.k:7:0Compiler must reject:
Compilation must fail with a diagnostic.
Flows
flow ~new click a branch to expand · @labels scroll to their anchor
new (leashes, capacity: 8, source: dog: ref(Nope))
Test Configuration
MUST_ERROR