From 4d12a44e443fbe3285a968e217cde3d27339bb3f Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sun, 15 Oct 2017 07:33:32 +0200 Subject: Reduce cascaded error messages. --- src/vhdl/errorout.adb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/vhdl/errorout.adb b/src/vhdl/errorout.adb index 2120332ba..9de1aff56 100644 --- a/src/vhdl/errorout.adb +++ b/src/vhdl/errorout.adb @@ -1559,9 +1559,12 @@ package body Errorout is "(" & Disp_Node (Callee) & " is defined here)", Callee); end Error_Pure; - procedure Error_Not_Match (Expr: Iir; A_Type: Iir) - is + procedure Error_Not_Match (Expr: Iir; A_Type: Iir) is begin + if Get_Kind (A_Type) = Iir_Kind_Error then + -- Cascade error message. + return; + end if; Error_Msg_Sem ("can't match " & Disp_Node (Expr) & " with type " & Disp_Node (A_Type), Expr); end Error_Not_Match; -- cgit v1.2.3