[Issue 20205] std.math: Wrong result for abs(int.min)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Sep 12 08:05:47 UTC 2019


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

--- Comment #2 from Dominikus Dittes Scherkl <dominikus at scherkl.de> ---
unittest
{
   byte a = -128;
   auto b = abs(a);
   assert(is(typeof(b) == ubyte));
   assert(b == 128);
}

--


More information about the Digitalmars-d-bugs mailing list