digitalmars.D.bugs - [Issue 18768] New: object.getArrayHash with custom toHash shouldn't
- d-bugmail puremagic.com (24/24) Apr 16 2018 https://issues.dlang.org/show_bug.cgi?id=18768
https://issues.dlang.org/show_bug.cgi?id=18768 Issue ID: 18768 Summary: object.getArrayHash with custom toHash shouldn't just sum hashes of array elements Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: druntime Assignee: nobody puremagic.com Reporter: n8sh.secondary hotmail.com Currently: ``` if(!hasCustomToHash(element)) return hashOf(ptr[0 .. elementSize * count], 0); size_t hash = 0; foreach(size_t i; 0 .. count) hash += element.getHash(ptr + i * elementSize); return hash; ``` --
Apr 16 2018