mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
25 lines
372 B
D
25 lines
372 B
D
// https://issues.dlang.org/show_bug.cgi?id=9884
|
|
module issue9884;
|
|
|
|
const(int)[] data;
|
|
|
|
static this()
|
|
{
|
|
data = new int[10];
|
|
foreach (ref x; data) x = 1;
|
|
data[] = 1;
|
|
}
|
|
|
|
struct Foo
|
|
{
|
|
static const(int)[] data;
|
|
|
|
static this()
|
|
{
|
|
this.data = new int[10];
|
|
foreach (ref x; this.data) x = 1;
|
|
this.data[] = 1;
|
|
}
|
|
}
|
|
|
|
void main() {}
|