Inheritance != subtyping
Eiffel
class C inherit P redefine eq feature b : Boolean is true; eq( other : like Current ) : Boolean is begin Result := (other.i = Current.i) and (other.b = Current.b) end end C
Eiffel
class C inherit P redefine eq feature b : Boolean is true; eq( other : like Current ) : Boolean is begin Result := (other.i = Current.i) and (other.b = Current.b) end end C