← Back to index
|
Original Bugzilla link
Bug 15111 – hashOf fails for structs that have an alias this to a dynamic array
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2015-09-24T15:55:59Z
Last change time
2020-03-21T03:56:41Z
Assigned to
No Owner
Creator
IdanArye
Comments
Comment #0
by GenericNPC — 2015-09-24T15:55:59Z
$ dmd --version DMD64 D Compiler v2.068 Copyright (c) 1999-2015 by Digital Mars written by Walter Bright $ cat app.d import core.internal.hash; struct Foo { int[] arr; alias arr this; } void main() { Foo().hashOf(); } $ dmd app.d app.d(9): Error: core.internal.hash.hashOf called with argument types (Foo) matches both: /usr/include/dlang/dmd/core/internal/hash.d(40): core.internal.hash.hashOf!(Foo).hashOf(Foo val, ulong seed) and: /usr/include/dlang/dmd/core/internal/hash.d(112): core.internal.hash.hashOf!(Foo).hashOf(Foo val, ulong seed) /usr/include/dlang/dmd/object.d(2999): Error: core.internal.hash.hashOf called with argument types (Foo, ulong) matches both: /usr/include/dlang/dmd/core/internal/hash.d(40): core.internal.hash.hashOf!(Foo).hashOf(ref Foo val, ulong seed) and: /usr/include/dlang/dmd/core/internal/hash.d(112): core.internal.hash.hashOf!(Foo).hashOf(ref Foo val, ulong seed) app.d(9): Error: template instance object.hashOf!(Foo) error instantiating
Comment #1
by github-bugzilla — 2016-04-26T19:14:36Z
Commits pushed to master at
https://github.com/dlang/druntime
https://github.com/dlang/druntime/commit/3af285fea29e7bbe2bea9b4fcb4b93f1ecb72755
fix issue 15111 - hashOf fails for structs that have an alias this to a dynamic array
https://github.com/dlang/druntime/commit/2d8b0a5901bde46d3f773ad1a22cd3780306067c
Merge pull request #1536 from BBasile/issue-15111 fix issue 15111 - hashOf fails for structs that have an alias this to a dynamic array
Comment #2
by github-bugzilla — 2016-10-01T11:44:39Z
Commits pushed to stable at
https://github.com/dlang/druntime
https://github.com/dlang/druntime/commit/3af285fea29e7bbe2bea9b4fcb4b93f1ecb72755
fix issue 15111 - hashOf fails for structs that have an alias this to a dynamic array
https://github.com/dlang/druntime/commit/2d8b0a5901bde46d3f773ad1a22cd3780306067c
Merge pull request #1536 from BBasile/issue-15111
Comment #3
by github-bugzilla — 2018-01-05T13:27:31Z
Commits pushed to dmd-cxx at
https://github.com/dlang/druntime
https://github.com/dlang/druntime/commit/3af285fea29e7bbe2bea9b4fcb4b93f1ecb72755
fix issue 15111 - hashOf fails for structs that have an alias this to a dynamic array
https://github.com/dlang/druntime/commit/2d8b0a5901bde46d3f773ad1a22cd3780306067c
Merge pull request #1536 from BBasile/issue-15111