diff options
Diffstat (limited to 'sem_names.adb')
-rw-r--r-- | sem_names.adb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sem_names.adb b/sem_names.adb index 48f4d28a8..bc9b0ed1e 100644 --- a/sem_names.adb +++ b/sem_names.adb @@ -2033,6 +2033,10 @@ package body Sem_Names is when Iir_Kinds_Function_Declaration => Sem_Parenthesis_Function (Prefix); if Res = Null_Iir then + Error_Msg_Sem + ("cannot match " & Disp_Node (Prefix) & " with actuals", + Name); + -- Display error message. declare Match : Boolean; begin @@ -2040,9 +2044,6 @@ package body Sem_Names is (Get_Interface_Declaration_Chain (Prefix), Assoc_Chain, True, Missing_Parameter, Name, Match); end; - Error_Msg_Sem - ("prefix is neither a function name " - & "nor can it be sliced or indexed", Name); end if; when Iir_Kinds_Object_Declaration |