[fpc-pascal] Incompatible type for generics?

Sven Barth pascaldragon at googlemail.com
Tue Sep 24 17:37:02 CEST 2013


Am 24.09.2013 17:32, schrieb Xiangrong Fang:
>
> I know it is same but why no error on the line:
>
> for n in sm1.reversed...
>
n is of type TStringMapper.PNode whereby PNode is declared inside 
TTreap<String, String> and thus the type is in reality a TTreap<String, 
String>.
sm1.reversed returns a TTreap<String, String> which has an enumerator 
that works on a TTreap<String, String>.PNode. So everything is well.

Regards,
Sven



More information about the fpc-pascal mailing list