On Sunday, 16 April 2023 at 06:39:17 UTC, Mike Parker wrote:

`t1` is default-initialized, so it's null.
    test t1, t2 = new test();

silly me. I should have picked that up myself. thanks.

Ditto for t3. Classes are reference objects, not value objects, so you must explicitly instantiate instances if you want them to be non-null.
    test t3;

again, silly me. I should have picked that up myself. thanks.

I wish D had value type classes as well.


Reply via email to