[fpc-pascal] Smart Pointers

Sven Barth pascaldragon at googlemail.com
Wed May 11 00:02:26 CEST 2016


Am 10.05.2016 23:06 schrieb "Maciej Izak" <hnb.code at gmail.com>:
>>
>> That is with (note these functions are generic):
>>
>> procedure Foo1<T>(A: TArray<T>);
>> procedure Foo2<T>(var A: TArray<T>);
>> procedure Foo3<T>(out A: TArray<T>);
>>
>> Where each can be called with a TManagedArray<T> as the "A" argument
without qualifying the Instance field?
>
>
> Yes, anyway example is buggy because we don't have "type inference" for
generic methods/functions like in Java (which is on my TODO list), but is
possible to compile and run example like this:

Type inference is another topic you won't find many friends for...

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


More information about the fpc-pascal mailing list