✓
Passing Passing: the compiler rejects this program as expected.
Code
// Identity crosses the two doors. A compound registered as `std/types:proto`
// and a compound registered as `std/proto` with the same bare name are not
// two namespaces or two scopes: they are the same registry entry claimed
// twice. The second spelling is convenient, not separate.
import std/proto
import std/types
std/types:proto(Engine) {
rpm: i32
}
std/proto(Engine) {
rpm: i32
}
Actual compiler output
error[KORU030]: duplicate proto declaration 'Engine' — a proto entry is registered once; the declaration at tests/regression/600_STDLIB/665_PROTO/665_007_identity_crosses_doors/input.k:12 collides with the prior registration at tests/regression/600_STDLIB/665_PROTO/665_007_identity_crosses_doors/input.k:8
--> tests/regression/600_STDLIB/665_PROTO/665_007_identity_crosses_doors/input.k:12:0
❌ Compiler coordination error: Phantom semantic validation failed
(set KORU_BACKEND_TRACE=1 for the backend return trace)Compiler must reject:
Compilation must fail with a diagnostic.
Flows
flow ~proto click a branch to expand · @labels scroll to their anchor
proto (expr: Engine, source: rpm: i32)
flow ~std/proto click a branch to expand · @labels scroll to their anchor
std/proto (Engine, source: rpm: i32)
Test Configuration
MUST_ERROR