From 142b11b75fd1de271094caaf3b65967415aae81c Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 22 Jul 2017 21:06:01 +0200 Subject: Avoid crash on indexed enumeration literal. Fix #389 --- src/vhdl/sem_names.adb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/vhdl') diff --git a/src/vhdl/sem_names.adb b/src/vhdl/sem_names.adb index a7f3c9690..07262a64f 100644 --- a/src/vhdl/sem_names.adb +++ b/src/vhdl/sem_names.adb @@ -2668,7 +2668,8 @@ package body Sem_Names is when Iir_Kinds_Process_Statement | Iir_Kind_Component_Declaration | Iir_Kind_Type_Conversion - | Iir_Kind_Unit_Declaration => + | Iir_Kind_Unit_Declaration + | Iir_Kind_Enumeration_Literal => Error_Msg_Sem (+Name, "%n cannot be indexed or sliced", +Prefix); Res := Null_Iir; -- cgit v1.2.3