[Issue 8007] Wrong documentation for '>>'
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Dec 23 11:11:40 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=8007
berni44 <bugzilla at d-ecke.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |bugzilla at d-ecke.de
Resolution|--- |INVALID
--- Comment #3 from berni44 <bugzilla at d-ecke.de> ---
IMHO the documentation is quite clear here and correct.
First, according to the docs, the opperands have to undergo integer promotion.
But for ulong, there is not promotion, therefore the opperand stays ulong.
It also tells, that the result is of the same type as the left side, hence the
result is an ulong. And therefore there are no signs. I read ">> is a signed
right shift" as "if there is a sign, it will be preserved". That's true here.
--
More information about the Digitalmars-d-bugs
mailing list