aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-sem_inst.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2023-01-10 18:36:58 +0100
committerTristan Gingold <tgingold@free.fr>2023-01-10 18:36:58 +0100
commit8bb886e329c1a7cbf0187cbc7a0b177c7cdd0b79 (patch)
tree6f2812099a96488aee0bda31d4769e6c54d5b7f5 /src/vhdl/vhdl-sem_inst.adb
parenta3f0fe3693602af086246ac57b0363578c96e171 (diff)
downloadghdl-8bb886e329c1a7cbf0187cbc7a0b177c7cdd0b79.tar.gz
ghdl-8bb886e329c1a7cbf0187cbc7a0b177c7cdd0b79.tar.bz2
ghdl-8bb886e329c1a7cbf0187cbc7a0b177c7cdd0b79.zip
vhdl-sem_inst: adjust instantiation of interface type
Diffstat (limited to 'src/vhdl/vhdl-sem_inst.adb')
-rw-r--r--src/vhdl/vhdl-sem_inst.adb3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vhdl/vhdl-sem_inst.adb b/src/vhdl/vhdl-sem_inst.adb
index 5394114a9..3272628d1 100644
--- a/src/vhdl/vhdl-sem_inst.adb
+++ b/src/vhdl/vhdl-sem_inst.adb
@@ -1253,8 +1253,11 @@ package body Vhdl.Sem_Inst is
case Get_Kind (Inter_El) is
when Iir_Kind_Interface_Type_Declaration =>
Inter := Get_Association_Interface (Inst_El, Inter_El);
+ -- Redirect the interface type definition.
Set_Instance (Get_Type (Get_Origin (Inter)),
Get_Actual_Type (Inst_El));
+ -- And also the interface type declaration.
+ Set_Instance (Get_Origin (Inter), Inter);
-- Implicit operators.
declare
Imp_Inter : Iir;