[Issue 14804] Comparing two Nullables does not check if either is null
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Dec 24 23:41:58 PST 2015
https://issues.dlang.org/show_bug.cgi?id=14804
b2.temp at gmx.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |b2.temp at gmx.com
--- Comment #1 from b2.temp at gmx.com ---
I was about to propose a PR that changes the behavior of Nullable but actually
I think your report is invalid:
1/ it only throws in asseert mode, which allows to detect a wrong usage when
testing the software and maybe to add some isNull() before comparing if
necessary.
2/ if a custom opEquals() is added, even if it works fine, it becomes quite
unclear how opCmp() should behave then.
see the changes:
https://github.com/BBasile/phobos/commit/f458ad1318e5536c91882c02397df262961c63a2#diff-4e008aedb3026d4a84f58323e53bf017R1930
so I suggest you to close.
--
More information about the Digitalmars-d-bugs
mailing list