summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/generic_dispatch_p.ads
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gnat.dg/generic_dispatch_p.ads')
-rw-r--r--gcc/testsuite/gnat.dg/generic_dispatch_p.ads13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/generic_dispatch_p.ads b/gcc/testsuite/gnat.dg/generic_dispatch_p.ads
new file mode 100644
index 000000000..fe6115dd9
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/generic_dispatch_p.ads
@@ -0,0 +1,13 @@
+with Ada.Tags.Generic_Dispatching_Constructor;
+package generic_dispatch_p is
+ type Iface is interface;
+ function Constructor (I : not null access Integer) return Iface is abstract;
+ function Dispatching_Constructor
+ is new Ada.Tags.Generic_Dispatching_Constructor
+ (T => Iface,
+ Parameters => Integer,
+ Constructor => Constructor);
+ type DT is new Iface with null record;
+ overriding
+ function Constructor (I : not null access Integer) return DT;
+end;