On Sun, 25 Feb 2018, Bart wrote:

On Sun, Feb 25, 2018 at 1:01 PM, Michael Van Canneyt
<mich...@freepascal.org> wrote:

The compiler does not know at compile time what type the variant is, how can
you expect it to choose the "right" overloaded version ?

I would have expected that it will choose the right one @runtime .

Choices between overloads are always made at compile time.

Only if we add an
Abs(Variant) : Variant; which will then make the choice will this work. But I'm not sure whether this
would interfere with the normal working of abs() overloads.

Michael.
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to