digitalmars.D.bugs - [Issue 18142] New: checkedint opOpAssign doesn't accept a checkedint
- d-bugmail puremagic.com (28/28) Dec 29 2017 https://issues.dlang.org/show_bug.cgi?id=18142
https://issues.dlang.org/show_bug.cgi?id=18142 Issue ID: 18142 Summary: checkedint opOpAssign doesn't accept a checkedint Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1 Component: phobos Assignee: nobody puremagic.com Reporter: dhasenan gmail.com Test case: --- import std.experimental.checkedint; void main() { alias cint = Checked!(int, Throw); cint a = 10; cint b = 10; b += a; } --- Actual result: Error: 'b += a' is not a scalar, it is a Checked!(int, Throw) Expected result: the example should compile, and b shoulod get the value 20. --
Dec 29 2017