[Issue 205] Covariant return types don't work with forward-referenced types

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jun 19 08:32:17 PDT 2006


http://d.puremagic.com/issues/show_bug.cgi?id=205


smjg at iname.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |smjg at iname.com
            Summary|Covariant return types don't|Covariant return types don't
                   |work properly               |work with forward-referenced
                   |                            |types




------- Comment #1 from smjg at iname.com  2006-06-19 10:32 -------
(In reply to comment #0)
> If your interface has a method whose return type is another interface,
> covariance won't work.

Actually, the failure of your code has nothing to do with the fact that they're
interfaces.  It's a case of a bug I've noticed before, whereby covariance fails
if the return type is forward referenced.

For a real instance of what you've written in your first sentence, see issue
210.


-- 




More information about the Digitalmars-d-bugs mailing list