Comment #0 by bearophile_hugs — 2012-05-04T15:09:57Z
I am not sure, I think this is valid code:
struct Foo {
__gshared static int x;
}
void main() {
__gshared Foo f; // line 5
}
But DMD 2.060alpha gives the error:
test.d(5): Error: non-constant expression f = 0
Comment #1 by andrej.mitrovich — 2012-12-26T16:42:37Z
Reduced:
struct Foo {}
void main()
{
__gshared Foo f;
}
Very odd bug. Works with static.
Comment #2 by andrej.mitrovich — 2012-12-27T13:33:25Z