Thread overview
[Issue 179] Covariance screws up when overriding two interfaces or a class and an interface
Jun 12, 2006
d-bugmail
Jun 13, 2006
d-bugmail
Jun 13, 2006
d-bugmail
Jun 13, 2006
d-bugmail
Jun 13, 2006
d-bugmail
Jun 19, 2006
d-bugmail
Jul 01, 2006
d-bugmail
June 12, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=179





------- Comment #2 from smjg@iname.com  2006-06-12 16:37 -------
What compiler version and OS are you using exactly?  The first testcase looks like one I thought was fixed.  Can you still reproduce bug 65, from either the code posted there or the associated DStress testcases?


-- 

June 13, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=179





------- Comment #3 from lio@lunesu.com  2006-06-13 02:06 -------
(In reply to comment #1)
Bruno, your second program doesn't compile:

t.d(21): no property 'covfunc' for type 't.ICov'
t.d(21): function expected before (), not 1 of type int
t.d(21): cannot implicitly convert expression (1()) of type int to t.IFoo

(Digital Mars D Compiler v0.160)


-- 

June 13, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=179





------- Comment #4 from daiphoenix@lycos.com  2006-06-13 07:45 -------
(In reply to comment #3)
> (In reply to comment #1)
> Bruno, your second program doesn't compile:

That's right, damn, forgot to check the second program. ICov should be:

interface ICov {
    IFoo covfunc();
}


-- 

June 13, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=179





------- Comment #5 from daiphoenix@lycos.com  2006-06-13 08:00 -------
(In reply to comment #2)
> What compiler version and OS are you using exactly?  The first testcase looks like one I thought was fixed.  Can you still reproduce bug 65, from either the code posted there or the associated DStress testcases?

WinXP and the compiler is the latest of course (0.160). Bug 65 testcases run
fine (no bugs), both yours, and the DStress ones.
How about you, what do you get running my first or second program?
This does look similar to bug 65, but the difference here is that the covariant
parent (ICov) is an interface and not a class. Change ICov to a class, and the
test runs fine.


-- 

June 13, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=179





------- Comment #6 from smjg@iname.com  2006-06-13 08:15 -------
(In reply to comment #5)
> (In reply to comment #2)
>> What compiler version and OS are you using exactly?  The first testcase looks like one I thought was fixed.  Can you still reproduce bug 65, from either the code posted there or the associated DStress testcases?
> 
> WinXP and the compiler is the latest of course (0.160).  Bug 65 testcases run fine (no bugs), both yours, and the DStress ones. How about you, what do you get running my first or second program? This does look similar to bug 65, but the difference here is that the covariant parent (ICov) is an interface and not a class. Change ICov to a class, and the test runs fine.

Actually, it was meant to be part of bug 65, it was just inadvertently omitted from the testcases.

I will take your code home and test it though.


-- 

June 19, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=179





------- Comment #7 from smjg@iname.com  2006-06-19 10:20 -------
The cases given in comment 1 aren't of multiple types to override as is the essence of this bug.  Rather, it's something else that needs to be dealt with first.  I've filed issue 210 to take hold of it.


-- 

July 01, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=179


bugzilla@digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #8 from bugzilla@digitalmars.com  2006-06-30 20:27 -------
Fixed DMD 0.162
(First example now gives correct error message, following two work.)


--