1package Equal5 is 2 type Eq_Parent is tagged null record; 3 4 function "=" 5 (Left : Eq_Parent; 6 Right : Eq_Parent) return Boolean; 7 8 type Eq_Iface is interface; 9 10 function "=" 11 (Left : Eq_Iface; 12 Right : Eq_Iface) return Boolean is abstract; 13 procedure Op (Obj : Eq_Iface) is abstract; 14 15 ----------------- 16 -- Derivations -- 17 ----------------- 18 19 type Child_6 is new Eq_Parent and Eq_Iface with null record; 20 21 procedure Op (Obj : Child_6); 22 23 function Equals 24 (Left : Child_6; 25 Right : Child_6) return Boolean; 26 27 function "=" 28 (Left : Child_6; 29 Right : Child_6) return Boolean renames Equals; -- Test 30 31end Equal5; 32