Florian Klaempfl wrote:

... and one uses normally a function and not a var/out parameter.

That also would need a typecast since the function would return a parent class of the real class that was created, but the somehow the callee knows it's a descendent, so needs a cast to get to it (or use the "is" or "as" operators or ... etc).

This actually proves that a compiler error should also be required for the var/out parameter case as well.

Micha
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to