← Back to index
|
Original Bugzilla link
Bug 5225 – Signed right shift operator is ridiculous
Status
RESOLVED
Resolution
DUPLICATE
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2010-11-16T12:32:00Z
Last change time
2015-06-09T05:11:36Z
Keywords
rejects-valid
Assigned to
nobody
Creator
dfj1esp02
Depends on
3147
Blocks
2809
Comments
Comment #0
by dfj1esp02 — 2010-11-16T12:32:59Z
--- short f(short a) { return a>>1; } --- Error: cannot implicitly convert expression (cast(int)a >> 1) of type int to short ---
Comment #1
by clugdbug — 2010-11-25T06:49:02Z
This is a simple range propagation bug, rather than a problem with the operator itself (unlike bug 2809).
Comment #2
by smjg — 2010-11-25T13:39:36Z
This is closely related to issue 1977.
Comment #3
by kennytm — 2011-06-12T11:07:25Z
*** This issue has been marked as a duplicate of issue 3147 ***