✓
Passing Passing: the compiler rejects this program as expected.
Code
// Pins the AMBIGUITY-FORCES-PICK wall (KORU140): when a bare name resolves
// against TWO active `[with]` regions that both own it, resolve-with-scopes must
// REJECT and demand explicit qualification — never silently pick one. Both
// app/alpha and app/beta export `ping`; both are opened; a bare `ping` follows,
// so it is owned by two vocabularies at once. The wall replaces the silent
// flow-head pick. `[with]` resolution is a metacircular pass (koru_std/
// compiler.kz), so its diagnostic surfaces at backend-exec — hence
// BACKEND_RUNTIME_ERROR, the same stage every other metacircular-analysis
// rejection reports at.
import std/io
import app/alpha
import app/beta
[with]app/alpha:ping(msg: "seed"): s |> [with]app/beta:ping(msg: s): t |> ping(msg: t): u |> std/io:print.ln("picked={{ u:s }}")
Supporting Files
// Local vocabulary A — defines `ping`.
pub tor ping { msg: string } -> string
ping -> msg
// Local vocabulary B — ALSO defines `ping`. The collision with app/alpha is the
// whole point of this pin.
pub tor ping { msg: string } -> string
ping -> msg
Actual compiler output
error[KORU140]: bare name 'ping' resolves against more than one opened vocabulary ('app.alpha' and 'app.beta') — qualify the call explicitly to pick one
--> tests/regression/600_STDLIB/641_PARSER/641_013_with_collision_forces_pick/input.k:15:0
❌ Compiler coordination error: error[KORU140]: bare name 'ping' resolves against more than one opened vocabulary ('app.alpha' and 'app.beta') — qualify the call explicitly to pick one
(set KORU_BACKEND_TRACE=1 for the backend return trace)Must fail at runtime with:
CONTAINS KORU140Flows
flow ~ping click a branch to expand · @labels scroll to their anchor
ping (msg: "seed")
Test Configuration
MUST_ERROR
koru.json:
{
"paths": {
"std": "../../../../../koru_std",
"app": "."
}
}