[Issue 10771] New: std.typecons.Nullable throws an exception on comparision of null values
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Aug 7 10:58:51 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10771
Summary: std.typecons.Nullable throws an exception on
comparision of null values
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: qaston at gmail.com
--- Comment #0 from QAston <qaston at gmail.com> 2013-08-07 10:58:50 PDT ---
The following code should work and assert should pass.
On dmd 2.063.2 assert "Called `get' on null Nullable!Test" occurs instead
---
import std.typecons;
void main()
{
struct Test{
int a;
}
Nullable!Test a;
Nullable!Test b;
assert(a==b);
}
---
So, IMO Nullable!T needs opEquals implemented.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list