Inheriting from an interface twice

Trass3r un at known.com
Fri Oct 1 08:36:11 PDT 2010


> void main()
> {
> 	Baz baz = new Baz();
> 	Bar bar = baz;
> 	
> 	Foo foo1 = bar;
> 	Foo foo2 = baz;
> 	
> 	assert(foo1 is foo2);
> }
>
>
> foo1 and foo2 have the same type and point to the same object. Yet they  
> have different addresses. Is it a bug, or a feature?

Looks fine?! Isn't foo1 == foo2 what you want?


More information about the Digitalmars-d mailing list