Consider the following code: ```d class Foo { }
class Bar { Foo foo = new Foo(); } void main() { Bar b1 = new Bar(); Bar b2 = new Bar(); assert(b1.foo != b2.foo); } ```The assert fails. This is completely surprising to me. Is this actually expected?
Gregor Mückl via Digitalmars-d-learn Wed, 09 Jun 2021 11:00:30 -0700
Consider the following code: ```d class Foo { }
class Bar { Foo foo = new Foo(); } void main() { Bar b1 = new Bar(); Bar b2 = new Bar(); assert(b1.foo != b2.foo); } ```The assert fails. This is completely surprising to me. Is this actually expected?