Debian Codegraph @

gcc/testsuite/gnat.dg/interface10.adb

raw
1 -- { dg-do run }
2 -- { dg-options "-gnata" }
3
4 with Ada.Text_IO;
5
6 procedure Interface10 is
7
8 type Iface is interface;
9
10 type My_First_Type is new Iface with null record;
11 type My_Second_Type is new Iface with null record;
12
13 procedure Do_Test (Object : in Iface'Class) is
14 begin
15 pragma Assert
16 ((Object in My_First_Type) = (Object in My_First_Type'Class));
17 end;
18
19 V : My_Second_Type;
20 begin
21 Do_Test (V);
22 end Interface10;