aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-errors.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-06-05 20:31:57 +0200
committerTristan Gingold <tgingold@free.fr>2019-06-05 20:31:57 +0200
commit43030758aaa098d5c0d8468ae779887ec3539927 (patch)
tree8d2189c094602491b2c5ece7e57ea8f85a74b61c /src/vhdl/vhdl-errors.adb
parent8acde9575b0f9ea7f6a9a99626c0a8a877caeb9c (diff)
downloadghdl-43030758aaa098d5c0d8468ae779887ec3539927.tar.gz
ghdl-43030758aaa098d5c0d8468ae779887ec3539927.tar.bz2
ghdl-43030758aaa098d5c0d8468ae779887ec3539927.zip
vhdl-errors: avoid a crash on error type.
Diffstat (limited to 'src/vhdl/vhdl-errors.adb')
-rw-r--r--src/vhdl/vhdl-errors.adb3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vhdl/vhdl-errors.adb b/src/vhdl/vhdl-errors.adb
index 7912fd157..541415cd7 100644
--- a/src/vhdl/vhdl-errors.adb
+++ b/src/vhdl/vhdl-errors.adb
@@ -880,6 +880,9 @@ package body Vhdl.Errors is
is
Decl : Iir;
begin
+ if Is_Error (Def) then
+ return "an erroneous type";
+ end if;
Decl := Get_Type_Declarator (Def);
if Decl /= Null_Iir then
return Image_Identifier (Decl);