[fpc-pascal] Re: Use generic class as parameter (was: how to write enumerator for trees)

Xiangrong Fang xrfang at gmail.com
Sat Mar 23 03:35:46 CET 2013


Hi Sven,

My unite uses contnrs unit, how can I instruct the compiler to use the
contnrs unit (also the Classes and sysutils units) of v2.7.1?  I have
already built 2.7.1 and now try to compile my program in the fpc source dir
as you told.

Thanks

2013/3/22 Xiangrong Fang <xrfang at gmail.com>

> I didn't see a DEB package for 2.7.1. I am currently using 2.6.0. Can I
> compile 2.7.1 from source with 2.6.0?
>
> 2013/3/22 Sven Barth <pascaldragon at googlemail.com>
>
>>  Am 22.03.2013 08:13, schrieb Xiangrong Fang:
>>
>> 2013/3/22 Sven Barth <pascaldragon at googlemail.com>
>>
>>
>>> > The problem is gone, because PNode is not a generic class, but only a
>>> record.   However, the following errors are generated:
>>>
>>> 2.6.x does not support nested types in generics. Generic fixes and
>>> improvements are only found in 2.7.1 as most of them were to invasive to be
>>> merged back.
>>>
>> OK, then why this error happened:
>>
>> demo2.lpr(76,13) Error: Incompatible types: got
>> "TRoller.TTreap$PPerson$Byte" expected "TRoller"
>>
>>
>> AFAIR there was also a problem with result types in generics. Could you
>> please test your code with 2.7.1 to be sure?
>>
>> Regards,
>> Sven
>>
>> _______________________________________________
>> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130323/f1060713/attachment.html>


More information about the fpc-pascal mailing list