Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 707d703

Browse files
authored
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 <sebi.wilzbach@gmail.com>
2 parents ba4c597 + 4f902ae commit 707d703

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/object.d

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4236,10 +4236,18 @@ Params:
42364236
42374237
Return: calculated hash value of $(D arg)
42384238
*/
4239-
size_t hashOf(T)(auto ref T arg, size_t seed = 0)
4239+
version (D_Ddoc)
42404240
{
4241-
import core.internal.hash;
4242-
return core.internal.hash.hashOf(arg, seed);
4241+
// This lets DDoc produce better documentation.
4242+
size_t hashOf(T)(auto ref T arg, size_t seed = 0)
4243+
{
4244+
static import core.internal.hash;
4245+
return core.internal.hash.hashOf(arg, seed);
4246+
}
4247+
}
4248+
else
4249+
{
4250+
public import core.internal.hash : hashOf;
42434251
}
42444252

42454253
///

0 commit comments

Comments
 (0)