diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-07-22 21:05:09 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-07-22 21:05:09 +0200 |
commit | f670551a30171a4c6b9fe984b8c12c9bbb55b684 (patch) | |
tree | 841383277b98f349096187464debe8e30da1c88d /src/vhdl | |
parent | 970842923716a4d323a8d6cbe932728a59da684f (diff) | |
download | ghdl-f670551a30171a4c6b9fe984b8c12c9bbb55b684.tar.gz ghdl-f670551a30171a4c6b9fe984b8c12c9bbb55b684.tar.bz2 ghdl-f670551a30171a4c6b9fe984b8c12c9bbb55b684.zip |
is_same_profile: handle enumeration_literal and function.
Fix #388
Diffstat (limited to 'src/vhdl')
-rw-r--r-- | src/vhdl/iirs_utils.adb | 10 |
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; |