From d6d94cd960f0d28b49e84eca2a3f5451a5d0a4af Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 1 Jun 2022 07:58:14 +0200 Subject: vhdl: improve use of interface types. For #2070 --- src/vhdl/vhdl-sem_types.adb | 4 ++++ src/vhdl/vhdl-utils.adb | 2 ++ 2 files changed, 6 insertions(+) (limited to 'src') diff --git a/src/vhdl/vhdl-sem_types.adb b/src/vhdl/vhdl-sem_types.adb index f4f142f6a..2c0d54636 100644 --- a/src/vhdl/vhdl-sem_types.adb +++ b/src/vhdl/vhdl-sem_types.adb @@ -2401,6 +2401,10 @@ package body Vhdl.Sem_Types is Free_Name (Def); return Type_Mark; + when Iir_Kind_Interface_Type_Definition => + Error_Msg_Sem (+Def, "interface types can't be constrained"); + return Type_Mark; + when Iir_Kind_Error => return Type_Mark; diff --git a/src/vhdl/vhdl-utils.adb b/src/vhdl/vhdl-utils.adb index 300c082a5..8123e27f6 100644 --- a/src/vhdl/vhdl-utils.adb +++ b/src/vhdl/vhdl-utils.adb @@ -1234,6 +1234,8 @@ package body Vhdl.Utils is | Iir_Kind_Across_Attribute | Iir_Kind_Through_Attribute => return Get_Type (Ind); + when Iir_Kind_Interface_Type_Definition => + return Ind; when Iir_Kind_Error => return Ind; when others => -- cgit v1.2.3