From a79870e0fef0b94e7064c60b4672f74cddc15e95 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 30 Dec 2019 16:06:01 +0100 Subject: ams-vhdl: improve error recovery --- src/vhdl/vhdl-sem_stmts.adb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/vhdl/vhdl-sem_stmts.adb') diff --git a/src/vhdl/vhdl-sem_stmts.adb b/src/vhdl/vhdl-sem_stmts.adb index e1cb740b6..98e01ccb3 100644 --- a/src/vhdl/vhdl-sem_stmts.adb +++ b/src/vhdl/vhdl-sem_stmts.adb @@ -2107,6 +2107,7 @@ package body Vhdl.Sem_Stmts is procedure Sem_Simple_Simultaneous_Statement (Stmt : Iir) is Left, Right : Iir; + Left_Type, Right_Type : Iir; Res_Type : Iir; begin Left := Get_Simultaneous_Left (Stmt); @@ -2120,6 +2121,12 @@ package body Vhdl.Sem_Stmts is return; end if; + Left_Type := Get_Type (Left); + Right_Type := Get_Type (Right); + if Left_Type = Null_Iir or else Right_Type = Null_Iir then + return; + end if; + Res_Type := Search_Compatible_Type (Get_Type (Left), Get_Type (Right)); if Res_Type = Null_Iir then Error_Msg_Sem -- cgit v1.2.3