aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/iirs_utils.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/vhdl/iirs_utils.adb')
-rw-r--r--src/vhdl/iirs_utils.adb10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/vhdl/iirs_utils.adb b/src/vhdl/iirs_utils.adb
index ab4c8831d..9daf36c9a 100644
--- a/src/vhdl/iirs_utils.adb
+++ b/src/vhdl/iirs_utils.adb
@@ -1208,6 +1208,16 @@ package body Iirs_Utils is
and then R_Kind = Iir_Kind_Enumeration_Literal
then
return Get_Type (L1) = Get_Type (R1);
+ elsif L_Kind = Iir_Kind_Enumeration_Literal
+ and then R_Kind = Iir_Kind_Function_Declaration
+ then
+ return Get_Interface_Declaration_Chain (R1) = Null_Iir
+ and then Get_Base_Type (Get_Return_Type (R1)) = Get_Type (L1);
+ elsif L_Kind = Iir_Kind_Function_Declaration
+ and then R_Kind = Iir_Kind_Enumeration_Literal
+ then
+ return Get_Interface_Declaration_Chain (L1) = Null_Iir
+ and then Get_Base_Type (Get_Return_Type (L1)) = Get_Type (R1);
else
-- Kind mismatch.
return False;