✓
Passing Passing: the compiler rejects this program as expected.
Code
// Pins the compatibility gate on the enclosing-arm claim: name match is
// not enough. `push` declares `full string` — its arm binds `f`. The
// nested `std/rings:enqueue` produces a VOID `full`, which cannot supply
// `f` — the claim must refuse and the two-line spelling stays mandatory.
// Green today AND after the claim pass lands: this is the "two lines when
// incompatible" invariant.
import std/rings
import std/io
std/rings:new(ring, capacity: 2) { value: u64 }
pub tor push { v: u64 }
| ok
| full string
push = std/rings:enqueue(ring, v)
| ok => ok
| full => full "ring is full"
push(v: 42)
| ok |> std/rings:enqueue(ring, v: 100)
| ok |> std/io:print.ln("in")
| full f |> std/io:print.ln("{{ f:s }}")
Actual compiler output
error[KORU022]: branch 'full' must be handled but no continuation found
--> tests/regression/300_ADVANCED_FEATURES/320_STDLIB/320_173_rings_enclosing_arm_payload_mismatch/input.k:21:0
❌ Compiler coordination error: Incomplete branch coverage
(set KORU_BACKEND_TRACE=1 for the backend return trace)Compiler must reject:
Compilation must fail with a diagnostic.
Flows
flow ~new click a branch to expand · @labels scroll to their anchor
new (ring, capacity: 2, source: value: u64)
subflow ~push click a branch to expand · @labels scroll to their anchor
enqueue (ring, v)
flow ~push click a branch to expand · @labels scroll to their anchor
push (v: 42)
Test Configuration
MUST_ERROR