[fpc-devel] Generics are still broken

Anthony Walter sysrpl at gmail.com
Fri May 11 22:58:18 CEST 2012


Thanks Sven. Overall generics in Fpc are very much improved. So good
work! Your work is much appreciated!

I also experienced some different problems with classes which implement
generic interfaces where the compiler thinks that method aren't implement.

On my blog I have a page where I describe multicast events through delegates
source: http://www.codebot.org/delphi/?doc=9568

TDelegateImpl<T> = class(TInterfacedObject, IDelegate<T>)

Fpc gives me some problems with the class above specifically. All the
sources are on that page and they currently work with Delphi. I can
probably boil the problem into a smaller test case.

If you want some help let me know what I can do.

On Fri, May 11, 2012 at 4:17 PM, Sven Barth <pascaldragon at googlemail.com>wrote:

> On 11.05.2012 20:10, Anthony Walter wrote:
>
>> Okay with the latest trunk version I tried compiling my generic classes.
>> It seems there is a problem with fpc generics in that you cannot use a
>> generic as a type parameter. e.g type TDictionary<K,V> =
>> class(TEnumerable<TPair<K,V>>) ...
>>
>
> Yes, this is a known problem and already on my todo list (like most other
> generic bugs...)
>
> Regards,
> Sven
>
>
> ______________________________**_________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/**mailman/listinfo/fpc-devel<http://lists.freepascal.org/mailman/listinfo/fpc-devel>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20120511/39e7095d/attachment.html>


More information about the fpc-devel mailing list