Prechádzať zdrojové kódy

* removed po_function and instead check proctypeoption (more
comprehensive too)

git-svn-id: trunk@5693 -

Jonas Maebe 18 rokov pred
rodič
commit
9d28af4269
2 zmenil súbory, kde vykonal 5 pridanie a 7 odobranie
  1. 4 4
      compiler/pdecsub.pas
  2. 1 3
      compiler/symconst.pas

+ 4 - 4
compiler/pdecsub.pas

@@ -918,7 +918,6 @@ implementation
                   { pd=nil when it is a interface mapping }
                   if assigned(pd) then
                     begin
-                      include(pd.procoptions,po_function);
                       if try_to_consume(_COLON) then
                        begin
                          inc(testcurobject);
@@ -2522,11 +2521,12 @@ const
                    { Check procedure options, Delphi requires that class is
                      repeated in the implementation for class methods }
                    if (m_fpc in current_settings.modeswitches) then
-                     po_comp:=[po_classmethod,po_varargs,po_methodpointer,po_interrupt,po_function]
+                     po_comp:=[po_classmethod,po_varargs,po_methodpointer,po_interrupt]
                    else
-                     po_comp:=[po_classmethod,po_methodpointer,po_function];
+                     po_comp:=[po_classmethod,po_methodpointer];
 
-                   if ((po_comp * fwpd.procoptions)<>(po_comp * currpd.procoptions)) then
+                   if ((po_comp * fwpd.procoptions)<>(po_comp * currpd.procoptions)) or
+                      (fwpd.proctypeoption <> currpd.proctypeoption) then
                      begin
                        MessagePos1(currpd.fileinfo,parser_e_header_dont_match_forward,
                                    fwpd.fullprocname(false));

+ 1 - 3
compiler/symconst.pas

@@ -271,9 +271,7 @@ type
     { importing }
     po_has_importdll,
     po_has_importname,
-    po_kylixlocal,
-    { this is a function and not a procedure -- needed for tbf/tb0175 }
-    po_function
+    po_kylixlocal
   );
   tprocoptions=set of tprocoption;