diff options
author | Tristan Gingold | 2015-05-16 07:51:19 +0200 |
---|---|---|
committer | Tristan Gingold | 2015-05-16 07:51:19 +0200 |
commit | 915a588a02957fcadfeff7db15beab2b2948b37a (patch) | |
tree | aa5f866b016dc757e71297660329f0ba8f44e305 /src/vhdl/sem_names.adb | |
parent | c91b6b08c87a829ebb0692e2bc591aa580fb7a8a (diff) | |
download | ghdl-915a588a02957fcadfeff7db15beab2b2948b37a.tar.gz ghdl-915a588a02957fcadfeff7db15beab2b2948b37a.tar.bz2 ghdl-915a588a02957fcadfeff7db15beab2b2948b37a.zip |
Preliminary work to refine overload disambiguation.
Diffstat (limited to 'src/vhdl/sem_names.adb')
-rw-r--r-- | src/vhdl/sem_names.adb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/vhdl/sem_names.adb b/src/vhdl/sem_names.adb index 6299826..a49a7c7 100644 --- a/src/vhdl/sem_names.adb +++ b/src/vhdl/sem_names.adb @@ -2212,14 +2212,14 @@ package body Sem_Names is procedure Sem_Parenthesis_Function (Sub_Name : Iir) is Used : Boolean; R : Iir; - Match : Boolean; + Match : Compatibility_Level; begin Used := False; if Get_Kind (Sub_Name) = Iir_Kind_Function_Declaration then Sem_Association_Chain (Get_Interface_Declaration_Chain (Sub_Name), Assoc_Chain, False, Missing_Parameter, Name, Match); - if Match then + if Match /= Not_Compatible then Add_Result (Res, Sem_As_Function_Call (Prefix_Name, Sub_Name, Assoc_Chain)); @@ -2240,7 +2240,7 @@ package body Sem_Names is procedure Error_Parenthesis_Function (Spec : Iir) is - Match : Boolean; + Match : Compatibility_Level; begin Error_Msg_Sem ("cannot match " & Disp_Node (Prefix) & " with actuals", Name); @@ -3518,7 +3518,8 @@ package body Sem_Names is if Res_Type = Null_Iir then return Null_Iir; end if; - if not Are_Basetypes_Compatible (Get_Base_Type (Res_Type), A_Type) + if Are_Basetypes_Compatible (Get_Base_Type (Res_Type), A_Type) + = Not_Compatible then Error_Not_Match (Res, A_Type, Name); return Null_Iir; @@ -3537,6 +3538,7 @@ package body Sem_Names is exit when El = Null_Iir; if Are_Basetypes_Compatible (Get_Base_Type (Get_Type (El)), A_Type) + /= Not_Compatible then Add_Result (Res, El); end if; |