> 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?