diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/vhdl/vhdl-errors.adb | 2 | ||||
-rw-r--r-- | src/vhdl/vhdl-sem_expr.adb | 4 | ||||
-rw-r--r-- | src/vhdl/vhdl-sem_stmts.adb | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/vhdl/vhdl-errors.adb b/src/vhdl/vhdl-errors.adb index 541415cd7..1bed01213 100644 --- a/src/vhdl/vhdl-errors.adb +++ b/src/vhdl/vhdl-errors.adb @@ -958,7 +958,7 @@ package body Vhdl.Errors is procedure Error_Not_Match (Expr: Iir; A_Type: Iir) is begin - if Get_Kind (A_Type) = Iir_Kind_Error then + if Is_Error (A_Type) then -- Cascade error message. return; end if; diff --git a/src/vhdl/vhdl-sem_expr.adb b/src/vhdl/vhdl-sem_expr.adb index da499d449..8bb2ad324 100644 --- a/src/vhdl/vhdl-sem_expr.adb +++ b/src/vhdl/vhdl-sem_expr.adb @@ -4928,7 +4928,9 @@ package body Vhdl.Sem_Expr is if A_Type /= Null_Iir and then Are_Types_Compatible (Expr_Type, A_Type) = Not_Compatible then - Error_Not_Match (Expr, A_Type); + if not Is_Error (Expr_Type) then + Error_Not_Match (Expr, A_Type); + end if; return Null_Iir; end if; return Expr; diff --git a/src/vhdl/vhdl-sem_stmts.adb b/src/vhdl/vhdl-sem_stmts.adb index f8a42f182..26f412c62 100644 --- a/src/vhdl/vhdl-sem_stmts.adb +++ b/src/vhdl/vhdl-sem_stmts.adb @@ -1741,7 +1741,7 @@ package body Vhdl.Sem_Stmts is -- LRM93 9.7 -- The discrete range in a generation scheme of the first form must -- be a static discrete range; - if Get_Type (Param) /= Null_Iir + if not Is_Error (Get_Type (Param)) and then Get_Type_Staticness (Get_Type (Param)) < Globally then Error_Msg_Sem (+Stmt, "range must be a static discrete range"); |