[Issue 18307] -transition=intpromote deprecation message confusing

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Apr 15 02:48:20 UTC 2018


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

Zach the Mystic <reachzach at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reachzach at gmail.com

--- Comment #1 from Zach the Mystic <reachzach at gmail.com> ---
I tested it and this works:

// change this:
// value = -(cast(T)-header);

// to this:
value = cast(T)cast(byte)header;

header is a ubyte. When changed to a byte, in this context, it becomes
negative. The compiler then creates a corresponding negative int.

--


More information about the Digitalmars-d-bugs mailing list