✓
Passing This code compiles and runs correctly.
Code
// The production gate: a `~[prototype]` module compiled with `--release` is
// rejected outright (KORU029), before any lenient hole-synthesis. This is the
// SAME source as 400_160 (which compiles and RUNS in a dev build) — only the
// `--release` flag (COMPILER_FLAGS) is added, and it flips accept → reject.
//
// This is what stops prototype code from ever shipping: the release build
// refuses the annotation, so the dev workflow of "run incomplete now" always
// ends in "handle every branch and delete ~[prototype]" before release.
~[prototype]
~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` left unhandled. Compiles+runs WITHOUT --release (400_160); with
// --release the whole module is rejected KORU029.
Must fail at runtime:
Program must error when executed.
Error Verification
Actual Compiler Output
error[KORU029]: this module is marked ~[prototype] and cannot be built for release (--release) — handle every branch and remove ~[prototype], or drop --release for a dev build
--> release-gate:0:0
❌ Compiler coordination error: prototype module rejected in release build
error: CompilerCoordinationFailed
/Users/larsde/src/koru/tests/regression/400_RUNTIME_FEATURES/400_162_release_rejects_prototype_module/backend.zig:95:13: 0x1050139d3 in emit (backend)
return error.CompilerCoordinationFailed;
^
/Users/larsde/src/koru/tests/regression/400_RUNTIME_FEATURES/400_162_release_rejects_prototype_module/backend.zig:202:28: 0x105014b63 in main (backend)
const generated_code = try RuntimeEmitter.emit(compile_allocator, final_ast);
^Flows
flow ~run click a branch to expand · @labels scroll to their anchor
run
Test Configuration
MUST_FAIL
Compiler Flags:
--releaseExpected Error:
KORU029