[Issue 12693] New: multiple arithmetic assignment on same line fails for short and byte
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri May 2 14:01:42 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=12693
Issue ID: 12693
Summary: multiple arithmetic assignment on same line fails for
short and byte
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: major
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: vlevenfeld at gmail.com
this test passes:
uint x = 0;
(x += 1) %= 2;
assert (x == 1);
ubyte y = 0;
(y += 1) %= 2;
assert (y == 0);
// though I expected y == 1
y += 1;
y %= 2;
assert (y == 1);
// this is correct
using dmd from debian package dmd-bin v2.065.0-0
--
More information about the Digitalmars-d-bugs
mailing list