authorgravatar for timonkruiper@gmail.comTimon Kruiper <timonkruiper@gmail.com> 2019-06-13 15:44:50+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-06-16 14:36:23-04:00
log72029c2fc8083b1c0f2501cfc9e24d3fca4d66c2
treeb4de1267c1102cba6fc8d3ef48e04b0b422df187
parent4d3356435f453bdc24ac3c6c2da74d98c981db15

Added HashInt to function calls AutoHash\nFixes issue 2669


1 files changed, 5 insertions(+), 5 deletions(-)

std/hash_map.zig+5-5
...@@ -564,12 +564,12 @@ pub fn autoHash(key: var, comptime rng: *std.rand.Random, comptime HashInt: type...@@ -564,12 +564,12 @@ pub fn autoHash(key: var, comptime rng: *std.rand.Random, comptime HashInt: type
564 },564 },
565565
566 builtin.TypeId.Float => |info| {566 builtin.TypeId.Float => |info| {
567 return autoHash(@bitCast(@IntType(false, info.bits), key), rng);567 return autoHash(@bitCast(@IntType(false, info.bits), key), rng, HashInt);
568 },568 },
569 builtin.TypeId.Bool => return autoHash(@boolToInt(key), rng),569 builtin.TypeId.Bool => return autoHash(@boolToInt(key), rng, HashInt),
570 builtin.TypeId.Enum => return autoHash(@enumToInt(key), rng),570 builtin.TypeId.Enum => return autoHash(@enumToInt(key), rng, HashInt),
571 builtin.TypeId.ErrorSet => return autoHash(@errorToInt(key), rng),571 builtin.TypeId.ErrorSet => return autoHash(@errorToInt(key), rng, HashInt),
572 builtin.TypeId.Promise, builtin.TypeId.Fn => return autoHash(@ptrToInt(key), rng),572 builtin.TypeId.Promise, builtin.TypeId.Fn => return autoHash(@ptrToInt(key), rng, HashInt),
573573
574 builtin.TypeId.BoundFn,574 builtin.TypeId.BoundFn,
575 builtin.TypeId.ComptimeFloat,575 builtin.TypeId.ComptimeFloat,