← Back to index
|
Original Bugzilla link
Bug 1108 – Indexing an int[] not evaluatable at compile time
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2007-04-07T19:53:00Z
Last change time
2014-02-16T15:22:04Z
Keywords
rejects-valid
Assigned to
bugzilla
Creator
reiner.pope
Comments
Comment #0
by reiner.pope — 2007-04-07T19:53:01Z
CTFE cannot evaluate: int Index() { int[] data = [1]; return data[0]; } void main() { static assert(Index() == 1); } ctfebug.d(9): Error: cannot evaluate Index() at compile time ctfebug.d(9): static assert (Index() == 1) is not evaluatable at compile time
Comment #1
by bugzilla — 2007-04-11T22:03:32Z
Fixed dmd 1.011
Comment #2
by thomas-dloop — 2007-04-25T12:58:36Z
Added to DStress as
http://dstress.kuehne.cn/compile/i/interpret_05_A.d
http://dstress.kuehne.cn/compile/i/interpret_05_B.d
Comment #3
by thomas-dloop — 2007-04-25T14:15:38Z
Added to DStress as
http://dstress.kuehne.cn/compile/i/interpret_05_A.d
http://dstress.kuehne.cn/compile/i/interpret_05_B.d