[fpc-devel] suggestion: virtual method co-variance

Jonas Maebe jonas.maebe at elis.ugent.be
Tue Oct 14 15:34:41 CEST 2014


On 14 Oct 2014, at 14:21, Sven Barth wrote:

> At least at first sight there don't seem to be any real (technical)  
> reasons
> to not covariance for return values.

Delphi and/or FPC already support it to a certain extent, and the  
compiler contains some code for it (see  
compatible_childmethod_resultdef in defcmp.pas and its use in  
nobj.pas). I don't know the exact scenario under which it currently  
works in though.


jonas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20141014/0aa08450/attachment.html>


More information about the fpc-devel mailing list