[fpc-pascal] Incompatible type for generics?

Xiangrong Fang xrfang at gmail.com
Mon Sep 23 10:04:34 CEST 2013


> Short answer: you can't. The same would happen with normal classes.
>
> Long answer: You could add an additional method "Next" to your "TIntTree"
> which returns a "TIntTree" and just do "Result := TIntTree(inherited
> Next);" there.
>
> Why are you subclassing in this case anyway?
>
Thanks, I will inherit the method.  I need to add features in the
sub-class. This empty TIntTree is just to show the problem.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130923/b864cc5f/attachment.html>


More information about the fpc-pascal mailing list