⚠
Broken The test itself needs fixing.
Sibling-field union (`player: Player, enemy: Enemy` in the store seed) is not the store surface. The signed declaration was `entity: Player | Enemy`. These pins must not stay green in stdlib.
Failure Output
error[KORU161]: std/store:insert(arena): unknown kind 'ghost' — members are player, enemy
--> tests/regression/600_STDLIB/690_STORE/690_276_unknown_kind_refused/input.k:19:0 Code
// A kind must name a seed member. `ghost` is no member of this store —
// the vocabulary is the seed's field names (player, enemy), refused loudly
// rather than tagged as a phantom third kind.
import std/proto
import std/store
std/proto:f64(Health)
std/proto(Player) {
health: Health
}
std/proto(Enemy) {
health: Health
}
std/store:new(arena, capacity: 8) { player: Player, enemy: Enemy }
std/store:insert(arena, kind: ghost) { health: 10.0 }
Actual compiler output
error[KORU161]: std/store:insert(arena): unknown kind 'ghost' — members are player, enemy
--> tests/regression/600_STDLIB/690_STORE/690_276_unknown_kind_refused/input.k:19:0Compiler must reject:
Compilation must fail with a diagnostic.
Flows
flow ~f64 click a branch to expand · @labels scroll to their anchor
f64 (expr: Health)
flow ~std/proto click a branch to expand · @labels scroll to their anchor
std/proto (Player, source: health: Health)
flow ~std/proto click a branch to expand · @labels scroll to their anchor
std/proto (Enemy, source: health: Health)
flow ~new click a branch to expand · @labels scroll to their anchor
new (arena, capacity: 8, source: player: Player, enemy: Enemy)
flow ~insert click a branch to expand · @labels scroll to their anchor
insert (arena, kind: ghost, source: health: 10.0)
Test Configuration
MUST_ERROR