✓
Passing Passing: the compiler rejects this program as expected.
Code
// The host owns the arrangement, so derivations may not build from it. A
// proto field naming a foreign entry is refused at the declaration — no
// embedding of host-owned bytes into a Koru derivation, in either direction.
import std/proto
import std/foreign
std/foreign:struct(File) {
path
}
std/proto(Doc) {
file: File
}
Actual compiler output
error[KORU173]: std/proto(Doc): field 'file' names unknown terminal 'File' — a field must use a scalar material, a terminal or compound of its own home, or a qualified name from another home
--> tests/regression/600_STDLIB/667_FOREIGN/667_003_proto_field_names_foreign_refused/input.k:11:0Compiler must reject:
Compilation must fail with a diagnostic.
Flows
flow ~struct click a branch to expand · @labels scroll to their anchor
struct (expr: File, source: path)
flow ~std/proto click a branch to expand · @labels scroll to their anchor
std/proto (Doc, source: file: File)
Test Configuration
MUST_ERROR