diff options
author | Tristan Gingold <tgingold@free.fr> | 2018-02-25 07:41:29 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2018-02-25 07:41:29 +0100 |
commit | 05d1f28ddca493e9c19e72b65d8ec3772187bead (patch) | |
tree | 3beae9d49ccbc494dc489c7d2f34923bcc53a28b /src/vhdl | |
parent | 807570488884a51ed60c38f4ce0853b8e1191e3c (diff) | |
download | ghdl-05d1f28ddca493e9c19e72b65d8ec3772187bead.tar.gz ghdl-05d1f28ddca493e9c19e72b65d8ec3772187bead.tar.bz2 ghdl-05d1f28ddca493e9c19e72b65d8ec3772187bead.zip |
Minor rewrite for previous patch.
Diffstat (limited to 'src/vhdl')
-rw-r--r-- | src/vhdl/sem_assocs.adb | 10 | ||||
-rw-r--r-- | src/vhdl/sem_expr.adb | 3 |
2 files changed, 4 insertions, 9 deletions
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. |