[Issue 12693] multiple arithmetic assignment on same line fails for short and byte

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Nov 24 10:54:48 UTC 2019


https://issues.dlang.org/show_bug.cgi?id=12693

Basile-z <b2.temp at gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |b2.temp at gmx.com
         Resolution|---                         |WORKSFORME

--- Comment #1 from Basile-z <b2.temp at gmx.com> ---
This is working since 2.067.1 according to run.dlang.io

void main()
{
  uint x = 0;
  (x += 1) %= 2;
  assert (x == 1);
  ubyte y = 0;
  (y += 1) %= 2;
  assert (y == 1);
  y += 1;
  y %= 2;
  assert (y == 0);
}

--


More information about the Digitalmars-d-bugs mailing list