Bug 1361 – DMD 2.002 introduced bug:array initializers are not allowed?

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2007-07-22T22:23:00Z
Last change time
2015-06-09T01:04:59Z
Assigned to
bugzilla
Creator
zhuzhenping

Comments

Comment #0 by zhuzhenping — 2007-07-22T22:23:26Z
int[2][3]myarray = [5,5,5,5,5,5]; int main(char[][] args) { return 0; } Gives: “ Error: too many initializers, 6, for array[3]”
Comment #1 by ibisbasenji — 2007-07-23T08:42:54Z
...did that ever work? int[2][3] myarray = [[5,5],[5,5],[5,5]]; -- Chris Nicholson-Sauls
Comment #2 by zhuzhenping — 2007-07-23T19:02:41Z
(In reply to comment #1) > ...did that ever work? > > int[2][3] myarray = [[5,5],[5,5],[5,5]]; > > -- Chris Nicholson-Sauls > Yes,Thank you,it works.
Comment #3 by bugzilla — 2007-07-23T19:35:28Z
The original snippet should never have compiled, it wasn't a compiler bug. Although the code is valid C, it is not valid D.