✓
Passing Passing: the compiler rejects this program as expected.
Code
// A bare ref names this home's terminal or nothing. The entry mints no
// Health of its own, so bare `health: Health` is unknown even with two
// declarations elsewhere — homes are never searched, only addressed.
import app/alpha
import app/beta
import std/proto
std/proto(Player) {
health: Health
}
Supporting Files
// One of two homes minting Health.
import std/proto
std/proto:f64(Health)
// The other home minting Health — the ambiguity.
import std/proto
std/proto:f64(Health)
Actual compiler output
error[KORU173]: std/proto(Player): field 'health' names unknown terminal 'Health' — a field must use a scalar material, a terminal or compound of its own home, or a qualified name from another home
--> tests/regression/600_STDLIB/665_PROTO/665_014_bare_ref_is_home_scoped/input.k:8:0Compiler must reject:
Compilation must fail with a diagnostic.
Flows
flow ~std/proto click a branch to expand · @labels scroll to their anchor
std/proto (Player, source: health: Health)
Test Configuration
MUST_ERROR