From 05d1f28ddca493e9c19e72b65d8ec3772187bead Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sun, 25 Feb 2018 07:41:29 +0100 Subject: Minor rewrite for previous patch. --- src/vhdl/sem_assocs.adb | 10 +++------- src/vhdl/sem_expr.adb | 3 +-- 2 files changed, 4 insertions(+), 9 deletions(-) (limited to 'src/vhdl') diff --git a/src/vhdl/sem_assocs.adb b/src/vhdl/sem_assocs.adb index 3be3ba0a1..6bbc67215 100644 --- a/src/vhdl/sem_assocs.adb +++ b/src/vhdl/sem_assocs.adb @@ -1483,13 +1483,9 @@ package body Sem_Assocs is Inter : Iir; begin -- A function declaration. - case Get_Kind (Decl) is - when Iir_Kind_Function_Declaration - | Iir_Kind_Interface_Function_Declaration => - null; - when others => - return False; - end case; + if not Is_Function_Declaration (Decl) then + return False; + end if; -- That returns a boolean. if (Get_Base_Type (Get_Return_Type (Decl)) /= Std_Package.Boolean_Type_Definition) diff --git a/src/vhdl/sem_expr.adb b/src/vhdl/sem_expr.adb index e85e1c37c..4e27eb1ce 100644 --- a/src/vhdl/sem_expr.adb +++ b/src/vhdl/sem_expr.adb @@ -1781,8 +1781,7 @@ package body Sem_Expr is Decl := Get_Non_Alias_Declaration (Interpretation); -- It is compatible with operand types ? - pragma Assert (Kind_In (Decl, Iir_Kind_Function_Declaration, - Iir_Kind_Interface_Function_Declaration)); + pragma Assert (Is_Function_Declaration (Decl)); -- LRM08 12.3 Visibility -- [...] or all visible declarations denote the same named entity. -- cgit v1.2.3