✓
Passing Passing: the compiler rejects this program as expected.
Code
// Pins: --lang=<tag> must name a registered emitter or a proc variant
// declared in this program — anything else is refused, not compiled.
//
// Before the guard, `koruc input.k --lang=cs` compiled a program like
// this one to a working Zig executable: every lang other than `js`
// collapsed to the Zig emitter and Stage D, so a foreign or typo'd tag
// produced a binary under a name that selected nothing. The admitted
// set is emitters ∪ declared proc targets (full and base), so
// `--lang=mlir` stays legal where a `|mlir` body exists and
// `--lang=cs` is now admitted — std declares `|cs` bodies for its
// print/control surface. `rust` names nothing and must refuse.
import std/io
std/io:print.ln("should not get here")
Actual compiler output
error[KORU126]: --lang='rust' names no emitter and no proc variant declared in this program
emitters: zig, js
declared variant tags: cs, js, raw_posix, zig
`--lang=<tag>` selects which `~proc <tor>|<tag>` bodies get emitted — a tag nothing declares still compiles, under a name that selects nothing
fix: pass one of the declared tags, or declare `~proc <tor>|rust { ... }` bodies for the target firstFrontend must reject with:
CONTAINS KORU126Flows
flow ~print.ln click a branch to expand · @labels scroll to their anchor
print.ln (expr: "should not get here")
Test Configuration
MUST_ERROR
Compiler Flags:
--lang=rust