From 4ace23e95c0b9e5f0c789461ac966c22cfac3dcb Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Thu, 6 Dec 2018 20:27:51 +0100 Subject: Generics of instantiated package are not visible by selection from outside. For #440. --- src/vhdl/sem_names.adb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/vhdl') 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); -- cgit v1.2.3