Bug 10477 – Allow bit shift in array operation

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-06-26T09:15:07Z
Last change time
2024-12-13T18:08:36Z
Assigned to
No Owner
Creator
Ryuichi OHORI
Moved to GitHub: dmd#18617 →

Comments

Comment #0 by r.97all — 2013-06-26T09:15:07Z
import std.stdio; void main() { int[] a; a.length = 3; int[] b; b.length = 3; // both of the following cause same error. // Error: var has no effect in expression (c0) a[] <<= b[]; a[] <<= 1; // another error message. // Error: 'a[]' is not of integral type, it is a int[] a[] = a[] << 1; a[] = a[] << b[]; } I don't see why bit shift operation is not arrowed in array operations.
Comment #1 by yebblies — 2013-11-21T03:26:39Z
It's not listed in the spec, seems like a valid enhancement. http://dlang.org/arrays.html
Comment #2 by robert.schadek — 2024-12-13T18:08:36Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18617 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB