From 72029c2fc8083b1c0f2501cfc9e24d3fca4d66c2 Mon Sep 17 00:00:00 2001 From: Timon Kruiper Date: Thu, 13 Jun 2019 15:44:50 +0200 Subject: [PATCH] Added HashInt to function calls AutoHash\nFixes issue 2669 --- std/hash_map.zig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/std/hash_map.zig b/std/hash_map.zig index df7ba740e8..13ebb0a1fe 100644 --- a/std/hash_map.zig +++ b/std/hash_map.zig @@ -564,12 +564,12 @@ pub fn autoHash(key: var, comptime rng: *std.rand.Random, comptime HashInt: type }, builtin.TypeId.Float => |info| { - return autoHash(@bitCast(@IntType(false, info.bits), key), rng); + return autoHash(@bitCast(@IntType(false, info.bits), key), rng, HashInt); }, - builtin.TypeId.Bool => return autoHash(@boolToInt(key), rng), - builtin.TypeId.Enum => return autoHash(@enumToInt(key), rng), - builtin.TypeId.ErrorSet => return autoHash(@errorToInt(key), rng), - builtin.TypeId.Promise, builtin.TypeId.Fn => return autoHash(@ptrToInt(key), rng), + builtin.TypeId.Bool => return autoHash(@boolToInt(key), rng, HashInt), + builtin.TypeId.Enum => return autoHash(@enumToInt(key), rng, HashInt), + builtin.TypeId.ErrorSet => return autoHash(@errorToInt(key), rng, HashInt), + builtin.TypeId.Promise, builtin.TypeId.Fn => return autoHash(@ptrToInt(key), rng, HashInt), builtin.TypeId.BoundFn, builtin.TypeId.ComptimeFloat,