On 04/01/2012 08:13 PM, Read Bixby wrote:
Hm, I guess it's much simpler than that.  I must not be understanding
something about covariance.  The following code produces the same error
message (it has nothing to do with nestedness or shared classes):


interface Interface
{
     Interface getNext();
     const(Interface) getNext() const;
}

class Implementation : Interface
{
     Implementation getNext()
     {
         return null;
     }

     const(Implementation) getNext() const
     {
         return null;
     }
}


This is a compiler bug. It works if 'Interface' is changed to an abstract class.

Please report this issue to the bug tracker:
http://d.puremagic.com/issues/

Reply via email to