✓
Passing This code compiles and runs correctly.
Code
// The production guarantee behind prototype mode: WITHOUT `~[prototype]`, an
// unhandled non-optional terminal branch is rejected KORU022 — exactly as
// today (400_097). This is the SAME source as 400_160 with the annotation
// removed; the annotation is the only thing that lets the hole compile.
//
// This pins that prototype mode cannot leak into a production build: a hole is
// a hard compile error unless the file explicitly opts in with `~[prototype]`.
// There is no flag a caller can pass to silence it — the opt-in lives in the
// source, per-file, greppable.
~import std/io
~pub event run {}
| done
| err []const u8
~proc run|zig {
return .{ .err = "built path ran; done is still a hole" };
}
~run()
| err msg |> std/io:print.ln(msg)
// `| done` unhandled and NO `~[prototype]` — must fail KORU022.
Must fail at runtime:
Program must error when executed.
Error Verification
Actual Compiler Output
error[KORU022]: branch 'done' must be handled but no continuation found
--> tests/regression/400_RUNTIME_FEATURES/400_161_prototype_hole_rejected_without_annotation/input.kz:22:0
❌ Compiler coordination error: Incomplete branch coverage
error: CompilerCoordinationFailed
???:?:?: 0x10291b9d3 in _backend.RuntimeEmitter.emit (???)
???:?:?: 0x10291cb63 in _backend.main (???)Flows
flow ~run click a branch to expand · @labels scroll to their anchor
run
Test Configuration
MUST_FAIL
Expected Error:
KORU022