✓
Passing Passing: the compiler rejects this program as expected.
Code
// Test: `std/fleet:spawn(f, id:)` without `cell:` is refused — a fleet member
// IS a cell; the shape binding is not optional.
~import std/io
~import std/fleet
~import std/proto
~import std/runtime
~std/proto(room_state) {
visits: u32
}
~std/runtime:register(scope: "cell") {
}
~std/fleet:new(node, scope: "cell", world: "", capacity: 8)
~std/fleet(node)
| fleet f |> std/fleet:spawn(f, id: "room-9")
| spawned b |> std/io:print.ln("spawned")
| resident |> std/io:print.ln("resident")
| refused |> std/io:print.ln("refused")
Actual compiler output
[REGISTRY] Creating dispatcher for scope 'cell'
[REGISTRY] Found 0 events
[REGISTRY] Generated 9792 bytes
error[KORU161]: std/fleet:spawn: a fleet member is a cell — name the shape, `cell: room_state` (a declared std/proto)
--> tests/regression/400_RUNTIME_FEATURES/450_FLEET/450_005_spawn_requires_cell/input.kz:19:0Must fail at runtime with:
CONTAINS a fleet member is a cell
CONTAINS cell: room_stateFlows
flow ~std/proto click a branch to expand · @labels scroll to their anchor
std/proto (room_state, source: visits: u32)
flow ~register click a branch to expand · @labels scroll to their anchor
register (scope: "cell", source: )
flow ~new click a branch to expand · @labels scroll to their anchor
new (expr: node, scope: "cell", world: "", capacity: 8)
flow ~std/fleet click a branch to expand · @labels scroll to their anchor
std/fleet (node)
Test Configuration
MUST_ERROR