✓
Passing This code compiles and runs correctly.
Code
// Test: two std/refine blocks on the same type fold onto one facet —
// the meet is confluent, so `port`'s bounds from both blocks land as a
// single interval regardless of which transform fires first.
//
// Expected: Stage C prints the union meet once (expected_comptime);
// runtime prints `met`.
import std/proto
import std/refine
import std/io
std/proto(Server) {
port: i64
}
std/refine(Server) {
port: i64 & >1024
}
std/refine(Server) {
port: i64 & <=65535
}
std/io:print.ln("met")
Actual
met
Expected output
met
Expected comptime output
refine input:Server: port: i64 & >1024 & <=65535
refine input:Server: port: i64 & >1024 & <=65535Flows
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: i64 & >1024)
flow ~std/refine click a branch to expand · @labels scroll to their anchor
std/refine (Server, source: port: i64 & <=65535)
flow ~print.ln click a branch to expand · @labels scroll to their anchor
print.ln (expr: "met")
Test Configuration
MUST_RUN