Bug 4051 – [CTFE] array struct member item update

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

Comments

Comment #0 by bearophile_hugs — 2010-04-02T14:48:31Z
(Not tested with the latest bug fixes, so this can be already fixed) struct Foo { int[1] a; } int bar() { Foo f; f.a[0] = 1; return 0; } enum int _ = bar(); void main() {} dmd 2.042 gives: test.d(6): Error: Index assignment (f.a[0u]) = 1 is not yet supported in CTFE
Comment #1 by clugdbug — 2011-04-08T21:18:20Z