import std.stdio; void main() { auto aa = ['a':1, 'b':2, 'c':3]; assert('a' in aa); // Ok assert('b' in aa); // Ok assert('c' in aa); // Ok // Expected: // 'a', 'b' and 'c' in any order // Actual: // 'a', '\0' and '\0' foreach(char ch; aa.keys) write(ch); } In my full program (ie, not this simplified test case), the first key is 'a' (which is ok), the second is 'L' (should be 'b' or 'c'), and the third varies depending on seemingly trivial and unrelated changes elsewhere. This would seem to suggest a corrupted pointer somewhere, or maybe memory stomping.
*** This issue has been marked as a duplicate of issue 4201 ***