✓
Passing Passing: the compiler rejects this program as expected.
Code
// Test: the meet needs one base — refine saying `port: string` against a
// declaration that says `port: i64` is a loud conflict.
//
// Expected: the compile refuses naming the two bases (EXPECT).
import std/proto
import std/refine
std/proto(Server) {
port: i64
}
std/refine(Server) {
port: i32 & >0
}
Actual compiler output
error[KORU205]: std/refine(Server): field 'port' declares base 'i32' but the declaration says 'i64' — a meet needs one base, not two
--> tests/regression/600_STDLIB/671_REFINE/671_005_refine_base_mismatch_refused/input.k:12:0Must contain:
one base, not twoFlows
flow ~std/proto click a branch to expand · @labels scroll to their anchor
std/proto (Server, source: port: i64)
flow ~std/refine click a branch to expand · @labels scroll to their anchor
std/refine (Server, source: port: i32 & >0)
Test Configuration
MUST_ERROR