[fpc-pascal] "Error: Impossible operator overload" ...why?

Jonas Maebe jonas.maebe at elis.ugent.be
Thu Sep 16 11:31:33 CEST 2010


On 16 Sep 2010, at 11:26, Graeme Geldenhuys wrote:

> type
>  TfpgColor = type longword;
[snip]
> operator = (const AColor1, AColor2: TfpgColor) b: Boolean;

You cannot overload (or rather change the meaning of) operators for  
operator/type combinations that are natively handled by the compiler.  
"type longword" is handled the same as a regular longword by the  
compiler as far as all operators are concerned.


Jonas



More information about the fpc-pascal mailing list