D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7882 - Cannot initialize static array member in ctor
Summary: Cannot initialize static array member in ctor
Status: RESOLVED DUPLICATE of issue 6174
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 major
Assignee: No Owner
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2012-04-09 18:56 UTC by hsteoh
Modified: 2012-04-09 19:42 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description hsteoh 2012-04-09 18:56:12 UTC
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 hsteoh 2012-04-09 19:42:22 UTC
Probably duplicate of bug 6174.
Comment 2 hsteoh 2012-04-09 19:42:42 UTC

*** This issue has been marked as a duplicate of issue 6174 ***