From 43030758aaa098d5c0d8468ae779887ec3539927 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 5 Jun 2019 20:31:57 +0200 Subject: vhdl-errors: avoid a crash on error type. --- src/vhdl/vhdl-errors.adb | 3 +++ 1 file changed, 3 insertions(+) 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); -- cgit v1.2.3