✓
Passing Passing: the compiler rejects this program as expected.
Code
// A compound field cannot invent an identity by spelling a new word. `Mystery`
// is neither a scalar material nor a declared terminal, so the declaration
// itself must refuse it. This is the strict half of composition: named
// sameness is intentional, never inferred from an unregistered name.
import std/proto
std/proto(Player) {
health: Mystery
}
Actual compiler output
error[KORU173]: std/proto(Player): field 'health' names unknown terminal 'Mystery' — 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_005_unknown_terminal_refused/input.k:7: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: Mystery)
Test Configuration
MUST_ERROR