aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue439/e.vhdl
blob: 0b057da0123d07e3fa5ebe0a30be4f05a2bdf7e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package p is
  generic(
    function generic_f(b:bit) return boolean;
    function generic_f(b:boolean) return bit
  );
  function f(b:bit    ) return boolean;
  function f(b:boolean) return bit    ;
end package;

package body p is
  function f(b:bit    ) return boolean is begin return generic_f(b); end function;
  function f(b:boolean) return bit     is begin return generic_f(b); end function;
end package body;

entity e is end entity;
architecture a of e is
  function f(b:bit    ) return boolean is begin return false; end function;
  function f(b:boolean) return bit     is begin return  '0' ; end function;
  package q is new work.p generic map(f,f);
begin
  assert q.f('0') report "msg2" severity note;
end architecture;