aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/equal5.ads
blob: 0bf3be0bf7f43788a34e2e2396bc81375df488bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package Equal5 is
   type Eq_Parent is tagged null record;

   function "="
     (Left  : Eq_Parent;
      Right : Eq_Parent) return Boolean;

   type Eq_Iface is interface;

   function "="
     (Left  : Eq_Iface;
      Right : Eq_Iface) return Boolean is abstract;
   procedure Op (Obj : Eq_Iface) is abstract;

   -----------------
   -- Derivations --
   -----------------

   type Child_6 is new Eq_Parent and Eq_Iface with null record;

   procedure Op (Obj : Child_6);

   function Equals
     (Left  : Child_6;
      Right : Child_6) return Boolean;

   function "="
     (Left  : Child_6;
      Right : Child_6) return Boolean renames Equals;  --  Test

end Equal5;