I think it's not OK to accept x3 assignment and refuse the a2 assignment: struct Foo { immutable(char)[4] bar; } Foo x1 = { "AA" }; // No error. immutable(char)[4] a1 = "AA"; // No error. void main() { Foo x2 = { "AA" }; // No error. Foo x3 = Foo("AA"); // No error. immutable(char)[4] a2 = "AA"; // Error: lengths don't match // for array copy, 4 = 2 } Kenji Hara answers: http://forum.dlang.org/post/akeivrewkkhjuapbngel@forum.dlang.org > This is known static array initializing inconsistency between > DeclDefs scope and statement scope. I think it is a bug. See also, where I say that I think all of those five cases should be reported as bugs: http://d.puremagic.com/issues/show_bug.cgi?id=3849
Closing as duplicate. While this bug is much older and hence the other one should normally be marked duplicate, issue 19095 has a slightly better title, more discussion, and a PR attached to it. *** This issue has been marked as a duplicate of issue 19095 ***