[fpc-pascal] Generic + nested type = forward declaration not solved
Sven Barth
pascaldragon at googlemail.com
Wed Jan 16 10:59:06 CET 2013
Am 16.01.2013 04:09, schrieb robin:
> Why does the following fail with:
> test.pp(7,29) Error: Forward declaration not solved "constructor
> TVector$LongInt.TIter.Create;"
>
> program Test;
> {$mode objfpc}{$H+}
> type
> generic TVector<T> = object
> type
> TIter = object
> constructor Create;
> end;
> end;
> TIntVector = specialize TVector<Integer>;
> constructor TVector.TIter.Create; begin end;
> begin
> end.
An important information is missing: which compiler version do you use?
There were many improvements regarding generics in 2.7.1 that won't be
backmerged to 2.6.x.
Regards,
Sven
More information about the fpc-pascal
mailing list