diff options
Diffstat (limited to 'src/vhdl/vhdl-sem_inst.adb')
-rw-r--r-- | src/vhdl/vhdl-sem_inst.adb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/vhdl/vhdl-sem_inst.adb b/src/vhdl/vhdl-sem_inst.adb index b5a390a49..6b9061a58 100644 --- a/src/vhdl/vhdl-sem_inst.adb +++ b/src/vhdl/vhdl-sem_inst.adb @@ -735,7 +735,14 @@ package body Vhdl.Sem_Inst is Instantiate_Iir_Chain (Get_Declaration_Chain (Inter))); end if; when Iir_Kind_Interface_Type_Declaration => - Set_Type (Res, Get_Type (Inter)); + declare + Itype : Iir; + begin + Itype := Instantiate_Iir (Get_Type (Inter), False); + Set_Type (Res, Itype); + Set_Interface_Type_Definition (Res, Itype); + Set_Is_Ref (Res, True); + end; when Iir_Kinds_Interface_Subprogram_Declaration => Sem_Utils.Compute_Subprogram_Hash (Res); when others => @@ -1036,7 +1043,8 @@ package body Vhdl.Sem_Inst is -- Replace the incomplete interface type by the actual subtype -- indication. declare - Inter_Type_Def : constant Iir := Get_Type (Assoc_Formal); + Orig_Formal : constant Iir := Get_Origin (Assoc_Formal); + Inter_Type_Def : constant Iir := Get_Type (Orig_Formal); Actual_Type : constant Iir := Get_Actual_Type (Assoc); begin Set_Instance (Inter_Type_Def, Actual_Type); |