✓
Passing Passing: the compiler rejects this program as expected.
Code
// Test: the contradiction across a SCOPE boundary — a universal `==8080`
// and an `|fpga` `==9090`. The scoped facet is the meet of universal +
// scoped blocks, so it is empty; the universal facet keeps its own
// `==8080` and is untouched. This is the fold across an already-landed
// `facet_decl`, the path a sibling block never takes.
//
// Expected: the compile refuses with "refines to nothing" (EXPECT).
import std/proto
import std/refine
std/proto(Sample) {
value: i64
}
std/refine(Sample) {
value: i64 & ==8080
}
std/refine(Sample)|fpga {
value: i64 & ==9090
}
Actual compiler output
refine input:Sample: value: i64 & ==8080
error[KORU205]: std/refine(Sample): field 'value' refines to nothing — '==8080' and '==9090' cannot both hold
--> tests/regression/600_STDLIB/671_REFINE/671_025_refine_eq_scope_conflict_refused/input.k:19:0Must contain:
refines to nothingFlows
flow ~std/proto click a branch to expand · @labels scroll to their anchor
std/proto (Sample, source: value: i64)
flow ~std/refine click a branch to expand · @labels scroll to their anchor
std/refine (Sample, source: value: i64 & ==8080)
flow ~std/refine click a branch to expand · @labels scroll to their anchor
std/refine|fpga (Sample, source: value: i64 & ==9090)
Test Configuration
MUST_ERROR