[fpc-pascal] Implicit Operator Overloading

Mazola Winstrol mazofeifer at gmail.com
Sun Mar 6 22:09:14 CET 2016


Hello,

Fpc: 3.0

Should the compiler to allow the definition of two operator overloading
with the same parameters and diferent result types?

e.g:

==== code ====

  TMyRecord<T> record
     class operator Implicit(A: TMyRecord<T>): Real;
     class operator Implicit(A: TMyRecord<T>): Integer;
  end;

==== end ====

The code above doesn't compile. Error: function is already declared
Public/Forward operator.


Best reagrds
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160306/6498488b/attachment.html>


More information about the fpc-pascal mailing list