https://issues.dlang.org/show_bug.cgi?id=13209
Kenji Hara <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #1 from Kenji Hara <[email protected]> --- Introduced in: https://github.com/D-Programming-Language/dmd/pull/3400 However I think this is not a regression, because > struct Foo { > union { > immutable static struct { double x, y; } This line is an anonymous struct declaration with 'static' attribute, so x and y should become immutable static field. Therefore > immutable double[2] v; > } > Foo bar() { > return Foo(y, x); > } > } > void main() {} > > > dmd 2.066beta4 gives: > > test.d(7,19): Error: more initializers than fields (1) of Foo In git head, Foo.x and Foo.y are correctly analyzed as static fields, and Foo has only one instance field v. --
