Browse Source

* expect repetition of class for class methods and fixed error message to show the forward declaration instead of the current one

git-svn-id: trunk@3685 -
florian 19 years ago
parent
commit
6620181ee0
1 changed files with 3 additions and 3 deletions
  1. 3 3
      compiler/pdecsub.pas

+ 3 - 3
compiler/pdecsub.pas

@@ -2488,15 +2488,15 @@ const
                    { Check procedure options, Delphi requires that class is
                    { Check procedure options, Delphi requires that class is
                      repeated in the implementation for class methods }
                      repeated in the implementation for class methods }
                    if (m_fpc in aktmodeswitches) then
                    if (m_fpc in aktmodeswitches) then
-                     po_comp:=[po_varargs,po_methodpointer,po_interrupt]
+                     po_comp:=[po_classmethod,po_varargs,po_methodpointer,po_interrupt]
                    else
                    else
                      po_comp:=[po_classmethod,po_methodpointer];
                      po_comp:=[po_classmethod,po_methodpointer];
 
 
                    if ((po_comp * hd.procoptions)<>(po_comp * pd.procoptions)) then
                    if ((po_comp * hd.procoptions)<>(po_comp * pd.procoptions)) then
                      begin
                      begin
                        MessagePos1(pd.fileinfo,parser_e_header_dont_match_forward,
                        MessagePos1(pd.fileinfo,parser_e_header_dont_match_forward,
-                                   pd.fullprocname(false));
-                       aprocsym.write_parameter_lists(pd);
+                                   hd.fullprocname(false));
+                       aprocsym.write_parameter_lists(hd);
                        { This error is non-fatal, we can recover }
                        { This error is non-fatal, we can recover }
                      end;
                      end;