[Issue 13045] TypeInfo.getHash should return consistent result with object equality by default

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Jul 5 18:13:53 PDT 2014


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

--- Comment #4 from github-bugzilla at puremagic.com ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/a5c8c3afc84cad8ef62c119c4101acb8e6de3140
fix Issue 13045 - TypeInfo.getHash should return consistent result with object
equality by default

If struct member field has toHash method, or has non-bitwise equality, generate
__xtoHash implicitly to guarantee `a != b || typeid(S).getHash(&a) ==
typeid(S).getHash(&b)`.

--


More information about the Digitalmars-d-bugs mailing list