Bug 7882 – Cannot initialize static array member in ctor

Status
RESOLVED
Resolution
DUPLICATE
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-04-09T18:56:00Z
Last change time
2012-04-09T19:42:42Z
Keywords
rejects-valid
Assigned to
nobody
Creator
hsteoh

Comments

Comment #0 by hsteoh — 2012-04-09T18:56:12Z
Code: struct S { const(int)[4] data; this(const(int)[4] d) { data = d; } } void main() { S s; } Compiler output: test.d(4): Error: slice this.data[] is not mutable
Comment #1 by hsteoh — 2012-04-09T19:42:22Z
Probably duplicate of bug 6174.
Comment #2 by hsteoh — 2012-04-09T19:42:42Z
*** This issue has been marked as a duplicate of issue 6174 ***