On Wednesday, 12 March 2014 at 10:57:10 UTC, Steve Teale wrote:
interface I { auto myType(); }class A: I { auto myType() { return cast(A) null; } } void main() { I x = getSomeI(); typeof(x.myType()) y; }
Seems like you want covariance? I don't see how else having an interface that returns "auto" could work.
That said, I'd expect this to work:
//----
interface I
{
I myType();
}
class A: I
{
//auto myType() { return cast(A) null; } //Nope
A myType() { return cast(A) null; } //OK
}
//----
But app
