✓
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
❌ Compiler coordination error: Incomplete branch coverage
error: CompilerCoordinationFailed
/Users/larsde/src/koru/tests/regression/000_CORE_LANGUAGE/020_EVENTS_FLOWS/020_020_reject_destructure_void_branch/backend.zig:94:13: 0x102f561b7 in emit (backend)
return error.CompilerCoordinationFailed;
^
/Users/larsde/src/koru/tests/regression/000_CORE_LANGUAGE/020_EVENTS_FLOWS/020_020_reject_destructure_void_branch/backend.zig:190:28: 0x102f56ea3 in main (backend)
const generated_code = try RuntimeEmitter.emit(compile_allocator, final_ast);
^Test Configuration
MUST_FAIL