✓
Passing This code compiles and runs correctly.
Code
// The production guarantee behind the undeclared-branch relaxation (400_165):
// WITHOUT `~[prototype]`, a continuation arm for a branch the event does not
// declare is rejected KORU021 (unknown branch in continuation) — exactly as
// today. This is the SAME source as 400_165 with the annotation removed; the
// annotation is the only thing that lets the undeclared arm slide.
//
// This pins that the prototype doodle cannot leak into a production build: an
// undeclared arm is a hard compile error unless the file explicitly opts in
// with `~[prototype]`. "Lift the tag and it fails loudly" — the arm you thought
// about but never declared becomes an error the moment prototype is off.
~import std/io
~pub event run {}
| done
| err []const u8
~proc run|zig {
return .{ .err = "declared path ran" };
}
~run()
| done |> std/io:print.ln("done ran")
| err msg |> std/io:print.ln(msg)
| soon |> std/io:print.ln("undeclared arm — KORU021 without ~[prototype]")
Must fail at runtime:
Program must error when executed.
Error Verification
Actual Compiler Output
error[KORU021]: event 'input:run' has no branch 'soon' (available: done, err)
--> tests/regression/400_RUNTIME_FEATURES/400_166_undeclared_branch_rejected_without_annotation/input.kz:23:0
❌ Compiler coordination error: Incomplete branch coverage
error: CompilerCoordinationFailed
???:?:?: 0x1028cb9d3 in _backend.RuntimeEmitter.emit (???)
???:?:?: 0x1028ccb63 in _backend.main (???)Flows
flow ~run click a branch to expand · @labels scroll to their anchor
run
Test Configuration
MUST_FAIL
Expected Error:
KORU021