digitalmars.D.bugs - [Issue 2375] New: Error using invariant array initializers with indexed elements
- d-bugmail puremagic.com (24/24) Sep 26 2008 http://d.puremagic.com/issues/show_bug.cgi?id=2375
- d-bugmail puremagic.com (6/6) Sep 26 2008 http://d.puremagic.com/issues/show_bug.cgi?id=2375
- d-bugmail puremagic.com (5/5) Sep 30 2008 http://d.puremagic.com/issues/show_bug.cgi?id=2375
- d-bugmail puremagic.com (4/4) Oct 01 2008 http://d.puremagic.com/issues/show_bug.cgi?id=2375
- d-bugmail puremagic.com (10/10) Oct 02 2008 http://d.puremagic.com/issues/show_bug.cgi?id=2375
- d-bugmail puremagic.com (5/5) Oct 02 2008 http://d.puremagic.com/issues/show_bug.cgi?id=2375
- d-bugmail puremagic.com (6/8) Oct 03 2008 May I ask what's wrong with the syntax?
http://d.puremagic.com/issues/show_bug.cgi?id=2375 Summary: Error using invariant array initializers with indexed elements Product: D Version: 2.019 Platform: PC OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: samukha voliacable.com May be duplicate of http://d.puremagic.com/issues/show_bug.cgi?id=1253 Marking it critical as the only workaround I've found is dupping the array, which is not acceptable. enum int[] a = [1 : 1]; void main() { auto e = a[0]; } ---- Error: array initializers as expressions are not allowed (x4) --
Sep 26 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2375 samukha voliacable.com changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |critical --
Sep 26 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2375 workaround invariant int[2] a = [1:1]; --
Sep 30 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2375 works, thanks --
Oct 01 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2375 bugzilla digitalmars.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID The error message is correct, and so is the workaround. Not a bug, though the array initializer syntax should be improved. --
Oct 02 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2375 I've turned bug 1253 into tracker of struct/array initializers syntax issues. Or should we open a tracker explicitly? --
Oct 02 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2375Not a bug, though the array initializer syntax should be improved.May I ask what's wrong with the syntax? Also, since I can't remember when the compiler has been issuing duplicate error messages, which is a big stress factor :) --
Oct 03 2008