aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl
diff options
context:
space:
mode:
Diffstat (limited to 'src/vhdl')
-rw-r--r--src/vhdl/sem_names.adb5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vhdl/sem_names.adb b/src/vhdl/sem_names.adb
index 9b1c22050..13e96c4e7 100644
--- a/src/vhdl/sem_names.adb
+++ b/src/vhdl/sem_names.adb
@@ -1300,6 +1300,11 @@ package body Sem_Names is
Error_Msg_Sem
(+Actual, "%n cannot be a type conversion operand", +Actual);
return Conv;
+ when Iir_Kind_Range_Expression =>
+ -- Try to nicely handle expression like NAME (A to B).
+ Error_Msg_Sem
+ (+Actual, "subtype indication not allowed in an expression");
+ return Conv;
when others =>
-- LRM93 7.3.5
-- The type of the operand of a type conversion must be