aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/bug054/gen4.vhdl
blob: a9543aaaef942108b2468f5a755d5824e538dfd8 (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
33
34
35
36
37
38
package gen1 is
  generic (v : natural := 5);

  function get return natural;
end gen1;

package body gen1 is
  function get return natural is
  begin
    return v;
  end get;
end gen1;

package gen2 is
  generic (package pkg is new work.gen1 generic map (<>));

  function get2 return natural;
end gen2;

package body gen2 is
  use pkg.all;
  
  function get2 return natural is
  begin
    return get;
  end get2;
end gen2;

package pkg1 is new work.gen1;
package pkg2 is new work.gen2 generic map (work.pkg1);

entity tb is
end tb;

architecture behav of tb is
begin
  assert work.pkg2.get2 = 5;
end behav;