✓
Passing This code compiles and runs correctly.
Code
// The void half of the linear rule applies to destructures too: a branch
// that carries no payload has nothing to destructure — KORU101.
~import std/io
~pub event check {}
| ok { code: i64, note: []const u8 }
| empty
~proc check|zig { return .{ .empty = .{} }; }
~check()
| ok { code } |> std/io:print.ln("{{ code:d }}")
| empty { x } |> std/io:print.ln("bad")
Must contain:
carries no payloadError Verification
Actual Compiler Output
error[KORU101]: branch 'empty' carries no payload — remove the binding '{...}'
--> tests/regression/000_CORE_LANGUAGE/020_EVENTS_FLOWS/020_020_reject_destructure_void_branch/input.kz:12:0
error[KORU036]: destructure field 'x' is not a field of branch 'empty' (payload fields: )
--> tests/regression/000_CORE_LANGUAGE/020_EVENTS_FLOWS/020_020_reject_destructure_void_branch/input.kz:14:0
❌ Compiler coordination error: Incomplete branch coverage
error: CompilerCoordinationFailed
???:?:?: 0x1029c79d3 in _backend.RuntimeEmitter.emit (???)
???:?:?: 0x1029c8b63 in _backend.main (???)Flows
flow ~check click a branch to expand · @labels scroll to their anchor
check
Test Configuration
MUST_FAIL