[Issue 10806] Interface covariance for more than one interface at once also broken
https://issues.dlang.org/show_bug.cgi?id=10806 Dlang Bot changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #6 from Dlang Bot --- dlang/dmd pull request #9515 "Fix issue 10806: check every interface for covariance, not just the first" was merged into master: - 175de6781a1b199c318b25db5494619ada84102c by Mathis Beer: Fix issue 10806: check every interface for covariance, not just the first https://github.com/dlang/dmd/pull/9515 --
[Issue 10806] Interface covariance for more than one interface at once also broken
https://issues.dlang.org/show_bug.cgi?id=10806 Dlang Bot changed: What|Removed |Added Keywords||pull --- Comment #5 from Dlang Bot --- @FeepingCreature created dlang/dmd pull request #9515 "Fix issue 10806: check every interface for covariance, not just the first" fixing this issue: - Fix issue 10806: check every interface for covariance, not just the first https://github.com/dlang/dmd/pull/9515 --
[Issue 10806] Interface covariance for more than one interface at once also broken
https://issues.dlang.org/show_bug.cgi?id=10806 --- Comment #4 from FeepingCreature --- This problem still exists on master. To demonstrate why it's a problem: import std.stdio; interface A1 { A1 foo(); } interface A2 { A2 foo(); void bar(); } class C1 : A1, A2 { override C1 foo() { return new C1; } override void bar() { writefln("bar"); } } void main() { A2 x = new C1; A2 y = x.foo(); writefln("X: %s", x.classinfo); writefln("Y: %s", y.classinfo); y.bar(); } Note that "A2 y" has an A1 vtable. --
[Issue 10806] Interface covariance for more than one interface at once also broken
https://issues.dlang.org/show_bug.cgi?id=10806 Andrei Alexandrescu changed: What|Removed |Added Version|D1 & D2 |D2 --
[Issue 10806] Interface covariance for more than one interface at once also broken
http://d.puremagic.com/issues/show_bug.cgi?id=10806 --- Comment #3 from FeepingCreature 2013-08-22 01:54:04 PDT --- > Additional example: > > http://dpaste.dzfl.pl/a390f1f4 That's not the same bug. The only issue with that code is that the compiler fails to warn you that the call to foo() is ambiguous. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 10806] Interface covariance for more than one interface at once also broken
http://d.puremagic.com/issues/show_bug.cgi?id=10806 --- Comment #2 from js.m...@gmail.com 2013-08-21 18:52:03 PDT --- Additional example: http://dpaste.dzfl.pl/a390f1f4 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 10806] Interface covariance for more than one interface at once also broken
http://d.puremagic.com/issues/show_bug.cgi?id=10806 --- Comment #1 from Infiltrator 2013-08-11 23:03:56 PDT --- Code and output for easy perusal. -- import std.stdio; interface A1 { A1 foo(); } interface A2 { A2 foo(); } class C1 : A1, A2 { override C1 foo() { return new C1; } } interface B1 { B1 foo(); } interface B2 { B2 foo(); } class C2 : B2, B1 { override C2 foo() { return new C2; } } void main() { A2 x = new C1; A2 y = x.foo(); writefln("X: %s", x.classinfo); writefln("Y: %s", y.classinfo); B2 a = new C2; B2 b = a.foo(); writefln("A: %s", a.classinfo); writefln("B: %s", b.classinfo); } --- Application output: X: f230.A2 Y: f230.A1 A: f230.B2 B: f230.B2 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---