Bug 4045 – [CTFE] increasing array length

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2010-04-02T14:21:00Z
Last change time
2015-06-09T05:13:43Z
Keywords
rejects-valid
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2010-04-02T14:21:48Z
(Not tested with the latest bug fixes, so this can be already fixed) int foo() { int[] a; a.length = 1; return 0; } enum int _ = foo(); void main() {} dmd 2.042 gives: test.d(3): Error: (a.length) = 1u cannot be evaluated at compile time
Comment #1 by clugdbug — 2010-05-31T00:36:21Z