← Back to index
|
Original Bugzilla link
Bug 774 – indexing / slicing a const arrays causes: "Error: non-constant expression"
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2006-12-30T07:49:00Z
Last change time
2014-02-15T13:18:38Z
Keywords
rejects-valid
Assigned to
nobody
Creator
thomas-dloop
Comments
Comment #0
by thomas-dloop — 2006-12-30T07:49:51Z
works: # # const A = (["abc", "789"])[0]; # fails: # # const B = ["abc", "789"]; # const C = B[0]; #
Comment #1
by thomas-dloop — 2006-12-30T20:09:23Z
fixed Deskzilla's standard priority
Comment #2
by strtr — 2010-07-21T23:04:47Z
Compiles with D1.062