✓
Passing This code compiles and runs correctly.
Code
// Transitive gate: the entry module is NOT itself prototype, but it imports a
// module that IS (`app/lib/proto` carries ~[prototype]). A `--release` build
// must still reject it — the gate refuses a prototype module ANYWHERE in the
// import graph, not just the entry file. Drop --release and this runs (a dev
// build allows prototype dependencies).
~import std/io
~import app/lib/proto
~app/lib/proto:greet(name: "world"): msg |> std/io:print.ln(msg)
Must fail at runtime:
Program must error when executed.
Error Verification
Actual Compiler Output
error[KORU029]: imported module 'app.lib.proto' is marked ~[prototype] and cannot be built for release (--release) — a release build rejects any prototype module in the graph; make it release-clean or drop --release
--> /Users/larsde/src/koru/tests/regression/400_RUNTIME_FEATURES/400_164_release_rejects_imported_prototype/lib/proto.kz:1:0
❌ Compiler coordination error: prototype module rejected in release build
error: CompilerCoordinationFailed
/Users/larsde/src/koru/tests/regression/400_RUNTIME_FEATURES/400_164_release_rejects_imported_prototype/backend.zig:95:13: 0x1025cb9d3 in emit (backend)
return error.CompilerCoordinationFailed;
^
/Users/larsde/src/koru/tests/regression/400_RUNTIME_FEATURES/400_164_release_rejects_imported_prototype/backend.zig:202:28: 0x1025ccb63 in main (backend)
const generated_code = try RuntimeEmitter.emit(compile_allocator, final_ast);
^Flows
flow ~greet click a branch to expand · @labels scroll to their anchor
greet (name: "world")
Imported Files
// A `~[prototype]`-marked library module. It is COMPLETE (no holes) — the
// annotation alone is what a release build refuses; the entry that imports it
// cannot be released while this module carries ~[prototype].
~[prototype]
~pub event greet { name: []const u8 } -> []const u8
~proc greet|zig {
return name;
}
Test Configuration
MUST_FAIL
Compiler Flags:
--releaseExpected Error:
KORU029