aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vhdl/sem_expr.adb4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vhdl/sem_expr.adb b/src/vhdl/sem_expr.adb
index 7e254583c..f22ccb2b9 100644
--- a/src/vhdl/sem_expr.adb
+++ b/src/vhdl/sem_expr.adb
@@ -3396,10 +3396,14 @@ package body Sem_Expr is
-- GHDL: must be checked for all associations, so do it outside
-- the above 'if' statement.
+ -- GHDL: improve error message.
case Get_Kind (El) is
when Iir_Kind_Choice_By_None
| Iir_Kind_Choice_By_Range =>
null;
+ when Iir_Kind_Choice_By_Others =>
+ Error_Msg_Sem
+ (+El, "expression for 'others' must be an element");
when others =>
Error_Msg_Sem
(+El, "positional association or "