Bug 21758 – std.experimental.checkedint opBinaryRight with integer left-hand side does not compile for any operators except + and -

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-03-24T13:40:58Z
Last change time
2021-04-27T09:42:46Z
Keywords
pull
Assigned to
No Owner
Creator
Nathan S.
Blocks
21169

Comments

Comment #0 by n8sh.secondary — 2021-03-24T13:40:58Z
--- void main() { import std.experimental.checkedint; assert(4 * checked(5L) == 20); // Fails to compile. assert(20 / checked(5L) == 4); // Fails to compile. assert(2 ^^ checked(3L) == 8); // Fails to compile. assert(12 % checked(5L) == 2); // Fails to compile. assert((0xff & checked(3L)) == 3); // Fails to compile. assert((0xf0 | checked(3L)) == 0xf3); // Fails to compile. assert((0xff ^ checked(5L)) == 0xf7); // Fails to compile. } ---
Comment #1 by dlang-bot — 2021-03-24T13:46:03Z
@n8sh created dlang/phobos pull request #7908 "std.experimental.checkedint opBinaryRight with integer left-hand side does not compile for any operators except + and -" fixing this issue: - Fix Issue 21758 - std.experimental.checkedint opBinaryRight with integer left-hand side does not compile for any operators except + and - https://github.com/dlang/phobos/pull/7908
Comment #2 by dlang-bot — 2021-03-24T14:47:36Z
dlang/phobos pull request #7908 "std.experimental.checkedint opBinaryRight with integer left-hand side does not compile for any operators except + and -" was merged into stable: - 9dc134c8db1f9a547552e471d9b5a5009a6b64b7 by Nathan Sashihara: Fix Issue 21758 - std.experimental.checkedint opBinaryRight with integer left-hand side does not compile for any operators except + and - https://github.com/dlang/phobos/pull/7908
Comment #3 by dlang-bot — 2021-04-25T13:46:05Z
dlang/phobos pull request #7964 "merge stable" was merged into master: - 6f430a7202366c1699618c7fe70f7d7800c7effe by Nathan Sashihara: Fix Issue 21758 - std.experimental.checkedint opBinaryRight with integer left-hand side does not compile for any operators except + and - https://github.com/dlang/phobos/pull/7964
Comment #4 by dlang-bot — 2021-04-27T09:42:46Z
dlang/phobos pull request #8012 "merge stable" was merged into master: - e516ec9351c9897417805a9f2b0839c9c099a97e by Nathan Sashihara: Fix Issue 21758 - std.experimental.checkedint opBinaryRight with integer left-hand side does not compile for any operators except + and - https://github.com/dlang/phobos/pull/8012