Re: interface is interface

2014-06-17 Thread rumbu via Digitalmars-d-learn
On Tuesday, 17 June 2014 at 19:02:34 UTC, Pavel wrote: class A : B, C { override void test() {} override void test1() {} } If you swap the interfaces (class A: C, B), "a is b" will return false, but "a is c" will return true. Clearly, this is a bug. void main() { A a = new A()

Re: interface is interface

2014-06-17 Thread Steven Schveighoffer via Digitalmars-d-learn
On Tue, 17 Jun 2014 15:02:33 -0400, Pavel wrote: Hello! import std.stdio; interface I { } interface B : I { void test(); } interface C : I { void test1(); } class A : B, C { override void test() {} override void test1() {} } void main() { A a = new A

interface is interface

2014-06-17 Thread Pavel via Digitalmars-d-learn
Hello! import std.stdio; interface I { } interface B : I { void test(); } interface C : I { void test1(); } class A : B, C { override void test() {} override void test1() {} } void main() { A a = new A(); I b = cast(B)a; I c = cast(C)a; w