Commit 72029c2fc8

Timon Kruiper <timonkruiper@gmail.com>
2019-06-13 15:44:50
Added HashInt to function calls AutoHash\nFixes issue 2669
1 parent 4d33564
Changed files (1)
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,