https://issues.dlang.org/show_bug.cgi?id=16763
--- Comment #1 from Denis Shelomovskii <[email protected]> --- (In reply to Denis Shelomovskii from comment #0) > int[int][] b = [[0 : 2]]; // expression ([[1]]) of type int[][] It was "expression ([[2]])" actually. So, looks like if `ArrayInitializer.inferType` isn't called AA literals are treated as array literals with explicit indices (see Static Initialization of Statically Allocated Arrays [1]) like in this code: --- import std.stdio; void main() { int[][] a = [[2: 6, 1: 345, 3: 78, 6: 12]]; writeln(a); int[][] aa = [1: [5: 7], 0: [7], 0: [0: 15] /* overrides previous element 0*/, [2: 6, 1: 3], /* overrides previous element 1*/ ]; writeln(aa); } --- [[0, 345, 6, 78, 0, 0, 12]] [[15], [0, 3, 6]] --- [1] http://dlang.org/spec/arrays.html#static-init-static --
