Bug 4050 – [CTFE] array struct member slice update

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

Comments

Comment #0 by bearophile_hugs — 2010-04-02T14:47:06Z
(Not tested with the latest bug fixes, so this can be already fixed) struct Foo { int[1] data; } int bar() { Foo f; f.data = [1]; return 0; } enum int _ = bar(); void main() {} dmd 2.042 gives: test.d(6): Error: Slice operation f.data[] = [1] cannot be evaluated at compile time test.d(9): Error: cannot evaluate bar() at compile time test.d(9): Error: cannot evaluate bar() at compile time
Comment #1 by clugdbug — 2011-04-08T21:17:57Z