https://issues.dlang.org/show_bug.cgi?id=14977
Issue ID: 14977 Summary: Struct initializer doesn't work inside AA initializer Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: jappleg...@gmail.com struct Foo { int a; } void main() { // compiles Foo[] arr = [ {a: 1}, {a: 2} ]; // compiles Foo[int] aa1 = [ 1: Foo(), 2: Foo() ]; // Error: not an associative array initializer Foo[int] aa2 = [ 1: {a: 1}, 2: {a: 2} ]; } --