⚠
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): column 'damage' is not a leaf of kind 'player' — player holds health, score
--> tests/regression/600_STDLIB/690_STORE/690_284_insert_foreign_leaf_refused/input.k:21:0 Code
// A kinded insert names only that member's leaves. `damage` belongs to
// enemy; a player row that writes it is refused — zero-fill is the
// call site's job, not a back door for the other kind's columns.
import std/proto
import std/store
std/proto:f64(Health)
std/proto(Player) {
health: Health
score: i64
}
std/proto(Enemy) {
health: Health
damage: i64
}
std/store:new(arena, capacity: 8) { player: Player, enemy: Enemy }
std/store:insert(arena, kind: player) { health: 98.6, score: 3, damage: 7 }
Actual compiler output
error[KORU161]: std/store:insert(arena): column 'damage' is not a leaf of kind 'player' — player holds health, score
--> tests/regression/600_STDLIB/690_STORE/690_284_insert_foreign_leaf_refused/input.k:21: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
score: i64)
flow ~std/proto click a branch to expand · @labels scroll to their anchor
std/proto (Enemy, source: health: Health
damage: i64)
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: player, source: health: 98.6, score: 3, damage: 7)
Test Configuration
MUST_ERROR