Bug 19049 – object.hashOf - don't wrap a public function with an identical public function

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-07-02T16:28:26Z
Last change time
2018-07-03T06:27:42Z
Assigned to
No Owner
Creator
Nathan S.

Comments

Comment #0 by n8sh.secondary — 2018-07-02T16:28:26Z
This is hashOf in object.d: ``` size_t hashOf(T)(auto ref T arg, size_t seed = 0) { import core.internal.hash; return core.internal.hash.hashOf(arg, seed); } ``` This serves no purpose because `core.internal.hash.hashOf` is public and also has an `auto ref` argument. So `core.internal.hash.hashOf` should either be publicly imported or exposed through an alias. This issue has synergy with PR https://github.com/dlang/druntime/pull/2238.
Comment #1 by github-bugzilla — 2018-07-03T06:27:41Z
Commits pushed to master at https://github.com/dlang/druntime https://github.com/dlang/druntime/commit/4f902aefed0b4b908c88f06fef32aa8782f9c09a Fix Issue 19049 - object.hashOf - don't wrap a public function with an identical public function https://github.com/dlang/druntime/commit/707d703c89f98d59a188e2e29cb2c5e67ba5e89b Merge pull request #2239 from n8sh/core-hash-19049 Fix Issue 19049 - object.hashOf - don't wrap a public function with an identical public function merged-on-behalf-of: Sebastian Wilzbach <[email protected]>