✓
Passing Passing: the compiler rejects this program as expected.
Code
// Test: `std/cell:open` without a `| cell` arm is refused — the arm IS the
// custody handoff; a silent open would mint an obligation nobody holds.
~import std/io
~import std/cell
~import std/proto
~import std/runtime
~std/proto(room_state) {
visits: u32
}
~std/runtime:register(scope: "cell") {
}
~std/cell:open(room_state, id: "assistant")
| 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/cell:open(room_state): the cell arrives on `| cell c |` — `std/cell:open(room_state, ...) | cell c |> ...`
--> tests/regression/400_RUNTIME_FEATURES/460_CELL/460_003_cell_open_requires_cell_arm/input.kz:16:0Must fail at runtime with:
CONTAINS | cell c |Flows
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 ~open click a branch to expand · @labels scroll to their anchor
open (expr: room_state, id: "assistant")
Test Configuration
MUST_ERROR