[fpc-pascal] Operator overload resolution with arrays

Sven Barth pascaldragon at googlemail.com
Mon Feb 5 19:54:48 CET 2018


Am 05.02.2018 17:50 schrieb "Martok" <listbox at martoks-place.de>:

Am 05.02.2018 um 15:49 schrieb Maciej Izak:
> for example final code for TFoo< TSomeArray> will be different than for
> TFoo<TSomeArray> declared in other module (!).
Crap. True.

Now I see why it is how it is.

The maximum extent would be to accept overloads (and helpers) that are
visible
at the parameter type's declaration, because they would necessarily be
visible
in all specializations as well. That would be pretty much the same as how it
currently accepts operators defined on the type, just one symtable up. It
would
also solve the "implementation restriction" from the manual - and only
that. I
think?


That *could* be a possibility. I'd need to think about it a bit though to
be sure that there are no caveats.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20180205/8e78b1ea/attachment.html>


More information about the fpc-pascal mailing list