aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-12-14 06:53:57 +0100
committerTristan Gingold <tgingold@free.fr>2017-12-14 21:27:44 +0100
commitc47d4c118d64fdb586485e08cde4b812bd48b899 (patch)
tree0eb73f69936a786d490e5470ba0dbf525d754d72 /src
parent5b2d6f78af531fecae9fd565e2ce53de29482957 (diff)
downloadghdl-c47d4c118d64fdb586485e08cde4b812bd48b899.tar.gz
ghdl-c47d4c118d64fdb586485e08cde4b812bd48b899.tar.bz2
ghdl-c47d4c118d64fdb586485e08cde4b812bd48b899.zip
Avoid cascaded error on incorrect type.
Diffstat (limited to 'src')
-rw-r--r--src/vhdl/sem_types.adb8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/vhdl/sem_types.adb b/src/vhdl/sem_types.adb
index 528a672ed..3ba95ca97 100644
--- a/src/vhdl/sem_types.adb
+++ b/src/vhdl/sem_types.adb
@@ -1951,7 +1951,10 @@ package body Sem_Types is
when Iir_Kind_Record_Type_Definition
| Iir_Kind_Record_Subtype_Definition =>
El_Type :=
- Reparse_As_Record_Constraint (El_Type);
+ Reparse_As_Record_Constraint
+ (El_Type);
+ when Iir_Kind_Error =>
+ null;
when others =>
Error_Msg_Sem
(+El_Type,
@@ -2245,6 +2248,9 @@ package body Sem_Types is
Free_Name (Def);
return Type_Mark;
+ when Iir_Kind_Error =>
+ return Type_Mark;
+
when others =>
Error_Kind ("sem_subtype_constraint", Type_Mark);
return Type_Mark;