Recent

Author Topic: Compiler bug ?  (Read 3137 times)

swierzbicki

  • Full Member
  • ***
  • Posts: 177
Compiler bug ?
« on: April 28, 2014, 02:17:38 pm »
I have a strange issue with this code :

Compiler is wrongly complaining about "Not all declarations of "RetrievePart" are declared with OVERLOAD".


Quote
C:\vcl\Indy\Lib\Protocols\IdIMAP4.pas(3829,19) Error: function header doesn't match any method of this class "TIdIMAP4.RetrievePart(const LongInt,const LongInt,var PBYTE,var LongInt,AnsiString):Boolean;"
C:\vcl\Indy\Lib\Protocols\IdIMAP4.pas(3815,19) Hint: Found declaration: TIdIMAP4.RetrievePart(const LongInt,const AnsiString,TStream,AnsiString="text"):Boolean;
C:\vcl\Indy\Lib\Protocols\IdIMAP4.pas(915,15) Hint: Found declaration: TIdIMAP4.RetrievePart(const LongInt,const AnsiString,var PByte,var LongInt,AnsiString="text"):Boolean;
C:\vcl\Indy\Lib\Protocols\IdIMAP4.pas(919,15) Hint: Found declaration: TIdIMAP4.RetrievePart(const LongInt,const LongInt,var PByte,var LongInt,AnsiString="text"):Boolean;
C:\vcl\Indy\Lib\Protocols\IdIMAP4.pas(3838,19) Error: Not all declarations of "RetrievePart" are declared with OVERLOAD
C:\vcl\Indy\Lib\Protocols\IdIMAP4.pas(3838,19) Error: function header doesn't match any method of this class "TIdIMAP4.RetrievePart(const LongInt,const AnsiString,var PBYTE,var LongInt,AnsiString):Boolean;"
C:\vcl\Indy\Lib\Protocols\IdIMAP4.pas(3815,19) Hint: Found declaration: TIdIMAP4.RetrievePart(const LongInt,const AnsiString,TStream,AnsiString="text"):Boolean;
C:\vcl\Indy\Lib\Protocols\IdIMAP4.pas(915,15) Hint: Found declaration: TIdIMAP4.RetrievePart(const LongInt,const AnsiString,var PByte,var LongInt,AnsiString="text"):Boolean;
C:\vcl\Indy\Lib\Protocols\IdIMAP4.pas(919,15) Hint: Found declaration: TIdIMAP4.RetrievePart(const LongInt,const LongInt,var PByte,var LongInt,AnsiString="text"):Boolean;
C:\vcl\Indy\Lib\Protocols\IdIMAP4.pas(3829,19) Hint: Found declaration: TIdIMAP4.RetrievePart(const LongInt,const LongInt,var PBYTE,var LongInt,AnsiString):Boolean;

I have attached my project. You can see there that all declarations are correctly declared on both interface and implementation section.
The "funny" thing is that code is correctly compiling when moving the windows unit from the implementation section to the interface section !

Has anyone an idea ? Why the compiler behave like this ?
 
Ps : target is WinCE / ARM. Work fine when target is win32/i386
                                   
« Last Edit: April 30, 2014, 09:17:52 am by swierzbicki »
Lazarus 1.6.2
fpc 3.0.0
wince/win32/win64
delphi berlin

 

TinyPortal © 2005-2018