✓
Passing Passing: the compiler rejects this program as expected.
Code
// 698_003 — extension field conflict: restating an inherited name with a
// DIFFERENT concept refuses. `hp` is i64 on Animal; Dog cannot redeclare it
// f64 — the merge dedups only what a shared name proves identical.
import std/proto
std/proto(Animal) {
hp: i64
}
std/proto(Dog <: Animal) {
hp: f64
}
Actual compiler output
error[KORU173]: std/proto(Dog): field 'hp' conflicts — 'i64' on Animal vs 'f64' on Dog; the merge dedups only what a shared name proves identical
--> tests/regression/600_STDLIB/698_OOP/698_003_proto_extends_field_conflict/input.k:10:0Compiler must reject:
Compilation must fail with a diagnostic.
Flows
flow ~std/proto click a branch to expand · @labels scroll to their anchor
std/proto (Animal, source: hp: i64)
flow ~std/proto click a branch to expand · @labels scroll to their anchor
std/proto (Dog <: Animal, source: hp: f64)
Test Configuration
MUST_ERROR