aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2018-12-29 07:42:59 +0100
committerTristan Gingold <tgingold@free.fr>2018-12-29 07:42:59 +0100
commit2d626654ff19b82917656e75cac89047675ed68b (patch)
tree1333da6f27fbffbc5ca103474c2624769ebf7b51
parent4b6901fb76af770f7b79c81f822c93d0f36c639d (diff)
downloadghdl-2d626654ff19b82917656e75cac89047675ed68b.tar.gz
ghdl-2d626654ff19b82917656e75cac89047675ed68b.tar.bz2
ghdl-2d626654ff19b82917656e75cac89047675ed68b.zip
sem_expr: improve error message.
-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 "