aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/discr51.adb
blob: 71a342050fd4d295cd612da9ee5934883f260b91 (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
32
--  { dg-do compile }

with Ada.Containers.Indefinite_Holders;

procedure Discr51 is

   package Inner is
      type Str (<>) is private;
   private
      type Str is array (Positive range <>) of Character;
   end Inner;

   package Inner2 is
      type Str2 (<>) is private;
   private
      type str2 is new inner.Str;
   end Inner2;

   type Str3 is new Inner.str;

   package Str_Holders is new Ada.Containers.Indefinite_Holders
      (Inner.Str, Inner."=");

   package Str2_Holders is new Ada.Containers.Indefinite_Holders
      (Inner2.Str2, Inner2."=");

   package Str3_Holders is new Ada.Containers.Indefinite_Holders
      (Str3, "=");

begin
   null;
end Discr51;