✓
Passing Passing: the compiler rejects this program as expected.
Code
// Cross-file deref check: the entry is declared in the imported lib, the
// deref in the consumer. `f.bogus` names no registered claim, so the Koru
// layer refuses it here — entries travel across imports; the check is not
// confined to the declaring module. The CONTAINS in EXPECT discriminates
// the layer (Zig's error never names `bogus`).
import app/lib
pub tor get-bogus { f: *File } -> string
get-bogus -> f.bogus
Supporting Files
// One home's File — the airlock entry lives where the host concept lives,
// not in the consumer. Importers deref through the import; the presence
// check travels with the entry.
import std/foreign
std/foreign:struct(File) {
path
handle
}
Actual compiler output
error[KORU030]: foreign entry 'File' has no field 'bogus' (fields: path, handle) — a foreign deref names a registered presence claim; the host owns substance
--> tests/regression/600_STDLIB/667_FOREIGN/667_006_foreign_deref_across_import/input.k:11:0
❌ Compiler coordination error: Validation failed (see errors above)
(set KORU_BACKEND_TRACE=1 for the backend return trace)Compiler must reject:
Compilation must fail with a diagnostic.
Test Configuration
MUST_ERROR