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

--- Comment #6 from RazvanN <[email protected]> ---
(In reply to Marenz from comment #5)
> 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?

Nullable wasn't design for reference types. I guess that a check could be added
to reject creating Nullable's from data structures that are not value types.

--

Reply via email to