[Issue 17440] Nullable.nullify() resets referenced object

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Jul 6 05:49:56 PDT 2017


https://issues.dlang.org/show_bug.cgi?id=17440

--- Comment #5 from Marenz <dmdtracker at supradigital.org> ---
Closing? Well.. It is _very_ unexpected that Nullable would just follow a
reference and kills everything. It's like you add a pointer to an array and
after setting it to null your pointed object is also reset.

While this is not a terrible problem to work around, it is quite inconsistent
and surprising behavior and I think this should really be fixed.

Do you really want to have such behavior in the std lib?

--


More information about the Digitalmars-d-bugs mailing list