Bug 1671 – associative array comparison fails

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2007-11-15T11:22:00Z
Last change time
2014-02-24T15:33:40Z
Keywords
wrong-code
Assigned to
nobody
Creator
d

Comments

Comment #0 by d — 2007-11-15T11:22:35Z
The final assertion in the following code fails: char[][char] X = ['a':cast(char[])"animal", 'b':['b','u','s']]; char[][char] Y = ['a':cast(char[])"animal", 'b':['b','u','s']]; assert (X.length == Y.length); assert (X.keys == Y.keys); assert (X.values == Y.values); //X.rehash; Y.rehash; // doesn't make a difference assert (X == Y); // fails
Comment #1 by bus_dbugzilla — 2009-04-23T22:52:27Z
Simpler example: assert([1:1] == [1:1]); // Fails
Comment #2 by clugdbug — 2010-05-31T12:03:52Z
Fixed DMD 1.057 and 2.041.