[fpc-pascal] why can't we define class operator for old fashion object type, but ok for 'advanced record' type?

Michael Van Canneyt michael at freepascal.org
Wed Aug 15 17:29:24 CEST 2018



On Wed, 15 Aug 2018, Sven Barth via fpc-pascal wrote:

>>
>> But maybe you are using mode delphi ? If so, try separating out the 
>> object
>> definition in a separate unit which is not compiled in delphi mode. 
> A global operator won't help at all as (currently) the operator won't be 
> visible during the specialization. Only if the operator is visible 
> during the *generic's* declaration it would be picked up.

That is contrary to the class operator, which is also only visible during
specialization, after all.

Is there a reason for this behaviour ?

Michael.



More information about the fpc-pascal mailing list