Check this: http://dpaste.dzfl.pl/ebbb3ebac60eIt doesn't give any error or warning. And writeln seems confused (do you see that "," at the end?)
This is an outright bug, please report on issues.dlang.org: void main() { import std.stdio : writeln; ["key": 10, "key" : 20, "key" : 30].length.writeln; ["key" : 30].length.writeln; } Prints: 3 1