[Issue 2511] dmd finds a proper overload as a non-covariant

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Dec 13 08:32:12 PST 2008


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


2korden at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |blocker




------- Comment #2 from 2korden at gmail.com  2008-12-13 10:32 -------
The error can fixed by removing "import Base;" from the I.d, but unfortunately
I can't do this in my application because interfaces have methods that accept
and return references to Base and Derived:

interface I
{
    void doStuff(Base b);
}

interface SubI : I
{
    void doStuff(Derived b);
}

A possible solution is to merge them into a single file (which is not
acceptable). You should also have a proper file order to compile them at once:

dmd Base I // okay
dmd I Base // fails to compile

Rising its severity until I find a workaround.


-- 



More information about the Digitalmars-d-bugs mailing list