25.09.2017 20:47, Adam D. Ruppe пишет:
On Monday, 25 September 2017 at 17:44:54 UTC, drug wrote:
https://run.dlang.io/is/uk0CMC
You didn't initialize it. It's not null, but it also isn't a valid
character.
but exception is caused by using `get` on null Foo instance, not by
invalid character as I can see
D initializes chars to 0xff, which is an invalid char.
Yes, if I initialize Nullable one it works, but it means that Nullable
can be constructed incorrectly by default and manual initialization is
needed always?
Perhaps the Nullable one should have initialized to null but otherwise
it looks ok.
Shouldn't Nullable one be initialized as a null by default?