diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-06-01 07:58:14 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-06-01 07:58:14 +0200 |
commit | d6d94cd960f0d28b49e84eca2a3f5451a5d0a4af (patch) | |
tree | d760f69b2d2f272031a2ea8775868438a00f7564 | |
parent | ff952bb0f229f2d3256c83da3a4ac2f6735fdd14 (diff) | |
download | ghdl-d6d94cd960f0d28b49e84eca2a3f5451a5d0a4af.tar.gz ghdl-d6d94cd960f0d28b49e84eca2a3f5451a5d0a4af.tar.bz2 ghdl-d6d94cd960f0d28b49e84eca2a3f5451a5d0a4af.zip |
vhdl: improve use of interface types. For #2070
-rw-r--r-- | src/vhdl/vhdl-sem_types.adb | 4 | ||||
-rw-r--r-- | src/vhdl/vhdl-utils.adb | 2 |
2 files changed, 6 insertions, 0 deletions
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 => |