Comment #0 by SebastianGraf — 2013-05-03T14:09:07Z
This snippet:
interface I { I makeI(); }
class D : I { D makeI() { return this; } }
class C : I { auto makeI() { return this; } }
does not compile. It fails in the third line with
Error: function C.makeI of type () overrides but is not covariant with I.makeI of type I()
I think this should compile, especially because class D with explicit return type compiles fine. It seems to me that covariance with the interface is checked for before the return type is inferred.
Comment #1 by SebastianGraf — 2013-05-28T14:01:45Z
*** This issue has been marked as a duplicate of issue 8318 ***