2
0
Эх сурвалжийг харах

* use compare_defs() instead of a plain "=" comparison to check that the
return type of the interface and implementation declaration of a function
match (so that in case the "real defs" match as described in the comment
of r17201, they are accepted as being the same)

git-svn-id: trunk@17207 -

Jonas Maebe 14 жил өмнө
parent
commit
bc46ea5cba
1 өөрчлөгдсөн 2 нэмэгдсэн , 2 устгасан
  1. 2 2
      compiler/pdecsub.pas

+ 2 - 2
compiler/pdecsub.pas

@@ -3084,7 +3084,7 @@ const
                 can be in a different location because of the calling convention, eg. L-R vs. R-L order (PFV) }
               (
                (compare_paras(currpd.paras,fwpd.paras,cp_none,[cpo_comparedefaultvalue,cpo_ignorehidden,cpo_openequalisexact,cpo_ignoreuniv])=te_exact) and
-               (fwpd.returndef=currpd.returndef)
+               (compare_defs(fwpd.returndef,currpd.returndef,nothingn)=te_exact)
               ) then
              begin
                { Check if we've found the forwarddef, if found then
@@ -3155,7 +3155,7 @@ const
                    if ((m_repeat_forward in current_settings.modeswitches) or
                        not is_bareprocdef(currpd)) and
                       ((compare_paras(currpd.paras,fwpd.paras,cp_all,paracompopt)<>te_exact) or
-                       (fwpd.returndef<>currpd.returndef)) then
+                       (compare_defs(fwpd.returndef,currpd.returndef,nothingn)<>te_exact)) then
                      begin
                        MessagePos1(currpd.fileinfo,parser_e_header_dont_match_forward,
                                    fwpd.fullprocname(false));