[Issue 11796] interface multiple inheritance not call methods
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Dec 22 01:13:39 PST 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11796
--- Comment #2 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-12-22 01:13:38 PST ---
(In reply to comment #1)
> Reduced:
What's worrying is that func2() ends up being called:
-----
interface I1 { void func1(); }
interface I2 { void func2(); }
interface I3 : I1 { }
interface I4 : I2, I3 { }
import std.stdio;
class Test : I4
{
void func1() { check = true; }
void func2() { assert(0); }
bool check;
}
void main()
{
I4 sub = new Test;
sub.func1(); // triggers assertion (func2 called)
}
-----
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list