Browse Source

* Do not use overload in implemetantion (bug ID 0037510)

git-svn-id: trunk@46322 -
michael 5 years ago
parent
commit
20e29a9442
1 changed files with 2 additions and 3 deletions
  1. 2 3
      packages/fcl-passrc/src/paswrite.pp

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

@@ -747,13 +747,11 @@ begin
     begin
     begin
     if LParentIsClassOrRecord then
     if LParentIsClassOrRecord then
       begin
       begin
-      Writeln('a');
       if NotOption(woNoExternalClass) then
       if NotOption(woNoExternalClass) then
         Add('; external name ''%s''',[aVar.ExportName.GetDeclaration(true)]);
         Add('; external name ''%s''',[aVar.ExportName.GetDeclaration(true)]);
       end
       end
     else if NotOption(woNoExternalVar) then
     else if NotOption(woNoExternalVar) then
       begin
       begin
-      Writeln('b');
       Add('; external ');
       Add('; external ');
       if (aVar.LibraryName<>Nil) then
       if (aVar.LibraryName<>Nil) then
         Add('%s ',[aVar.LibraryName.GetDeclaration(true)]);
         Add('%s ',[aVar.LibraryName.GetDeclaration(true)]);
@@ -840,6 +838,7 @@ begin
     Add('; '+cCallingConventions[TPasProcedureType(AProc).CallingConvention]);
     Add('; '+cCallingConventions[TPasProcedureType(AProc).CallingConvention]);
 end;
 end;
 
 
+
 procedure TPasWriter.WriteProcDecl(AProc: TPasProcedure; ForceBody : Boolean = False; NamePrefix : String = '');
 procedure TPasWriter.WriteProcDecl(AProc: TPasProcedure; ForceBody : Boolean = False; NamePrefix : String = '');
 
 
   Procedure EmptyBody;
   Procedure EmptyBody;
@@ -876,7 +875,7 @@ begin
   // delphi compatible order for example: procedure foo; reintroduce; overload; static;
   // delphi compatible order for example: procedure foo; reintroduce; overload; static;
   if not IsImpl and AProc.IsReintroduced then
   if not IsImpl and AProc.IsReintroduced then
     Add(' reintroduce;');
     Add(' reintroduce;');
-  if AProc.IsOverload then
+  if AProc.IsOverload and (Not FInImplementation) then
     Add(' overload;');
     Add(' overload;');
   if not IsImpl then
   if not IsImpl then
     begin
     begin