diff --git a/packages/fcl-passrc/src/paswrite.pp b/packages/fcl-passrc/src/paswrite.pp index 94070cb009..8135783ffb 100644 --- a/packages/fcl-passrc/src/paswrite.pp +++ b/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