diff options
author | Tristan Gingold <tgingold@free.fr> | 2018-12-06 20:27:51 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2018-12-06 20:27:51 +0100 |
commit | 4ace23e95c0b9e5f0c789461ac966c22cfac3dcb (patch) | |
tree | 0d93bb18ff6b7f144d218b7951d9687f68e4dca1 /src/vhdl | |
parent | 326a3f47358174e37cc8dc7942e696f2f59eea7c (diff) | |
download | ghdl-4ace23e95c0b9e5f0c789461ac966c22cfac3dcb.tar.gz ghdl-4ace23e95c0b9e5f0c789461ac966c22cfac3dcb.tar.bz2 ghdl-4ace23e95c0b9e5f0c789461ac966c22cfac3dcb.zip |
Generics of instantiated package are not visible by selection from outside.
For #440.
Diffstat (limited to 'src/vhdl')
-rw-r--r-- | src/vhdl/sem_names.adb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/vhdl/sem_names.adb b/src/vhdl/sem_names.adb index 749d848fe..329958f6a 100644 --- a/src/vhdl/sem_names.adb +++ b/src/vhdl/sem_names.adb @@ -405,13 +405,17 @@ package body Sem_Names is declare Header : constant Iir := Get_Package_Header (Decl); begin - if Is_Valid (Header) then + if Is_Valid (Header) + and then Get_Is_Within_Flag (Decl) + then Iterator_Decl_Chain (Get_Generic_Chain (Header), Id); end if; end; when Iir_Kind_Package_Instantiation_Declaration | Iir_Kind_Interface_Package_Declaration => - Iterator_Decl_Chain (Get_Generic_Chain (Decl), Id); + -- Generics are not visible in selected name. + null; + -- Iterator_Decl_Chain (Get_Generic_Chain (Decl), Id); when Iir_Kind_Block_Statement => declare Header : constant Iir := Get_Block_Header (Decl); |