瀏覽代碼

* Fix 0037544: overload writing refinement

git-svn-id: trunk@46367 -
michael 5 年之前
父節點
當前提交
40b59dd3cd
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      packages/fcl-passrc/src/paswrite.pp

+ 3 - 1
packages/fcl-passrc/src/paswrite.pp

@@ -923,7 +923,9 @@ begin
   // delphi compatible order for example: procedure foo; reintroduce; overload; static;
   if not IsImpl and AProc.IsReintroduced then
     Add(' reintroduce;');
-  if AProc.IsOverload and (Not FInImplementation) then
+  // if NamePrefix is not empty, we're writing a dummy for external class methods.
+  // In that case, we must not write the 'overload'.
+  if AProc.IsOverload and (NamePrefix='') then
     Add(' overload;');
   if not IsImpl then
     begin