Trass3r <[email protected]> wrote:

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?

He mentioned that the code asserts. I say this is fishy, but I don't know
if it should assert or not.

--
Simen

Reply via email to