[Issue 16974] Equal associative arrays with associative array keys are considered unequal

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Dec 15 08:26:12 PST 2016


https://issues.dlang.org/show_bug.cgi?id=16974

--- Comment #1 from Denis Shelomovskii <verylonglogin.reg at gmail.com> ---
The reason is incorrect hash calculation:
---
int[int] a = [1 : 2];
assert(typeid(a).getHash(&a) == typeid(a).getHash(&a)); // fails
---

Opened druntime pull 1715 [1].

This incorrect hash calculation became possible because of `hashOf` signature,
see Issue 16973.

[1] https://github.com/dlang/druntime/pull/1715

--


More information about the Digitalmars-d-bugs mailing list