[fpc-pascal] specialization of inner class of generic class

Sven Barth pascaldragon at googlemail.com
Wed Jan 4 13:15:54 CET 2012


Am 03.01.2012 14:00, schrieb Frank Fischer:
> Hi,
>
> I'm a fpc newbie and currently playing around with generic classes.
> Consider the following code:
>
[snip]
> % fpc test.pas
> Free Pascal Compiler version 2.6.0 [2011/12/23] for i386
> Copyright (c) 1993-2011 by Florian Klaempfl and others
> Target OS: Linux for i386
> Compiling test.pas
> test.pas(8,20) Error: Forward declaration not solved "TGen$LongInt.TInner.Func;"
> test.pas(20) Fatal: There were 1 errors compiling module, stopping
> Fatal: Compilation aborted
>
> It seems as if the line TInst = specialize TGen<Integer>  is not
> sufficient to specialize the inner class TInner of TGen<Integer>. What
> do I have to do to get a correct specialization of the inner class?
>
> Thanks in advance and sorry if this is a stupid question.

This is not supported with 2.6.0.

It's only supported in trunk (version 2.7.1) since December.

Regards,
Sven




More information about the fpc-pascal mailing list