mirror of
https://github.com/ziglang/zig.git
synced 2024-11-15 00:26:57 +00:00
Added HashInt to function calls AutoHash\nFixes issue 2669
This commit is contained in:
parent
4d3356435f
commit
72029c2fc8
@ -564,12 +564,12 @@ pub fn autoHash(key: var, comptime rng: *std.rand.Random, comptime HashInt: type
|
|||||||
},
|
},
|
||||||
|
|
||||||
builtin.TypeId.Float => |info| {
|
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.Bool => return autoHash(@boolToInt(key), rng, HashInt),
|
||||||
builtin.TypeId.Enum => return autoHash(@enumToInt(key), rng),
|
builtin.TypeId.Enum => return autoHash(@enumToInt(key), rng, HashInt),
|
||||||
builtin.TypeId.ErrorSet => return autoHash(@errorToInt(key), rng),
|
builtin.TypeId.ErrorSet => return autoHash(@errorToInt(key), rng, HashInt),
|
||||||
builtin.TypeId.Promise, builtin.TypeId.Fn => return autoHash(@ptrToInt(key), rng),
|
builtin.TypeId.Promise, builtin.TypeId.Fn => return autoHash(@ptrToInt(key), rng, HashInt),
|
||||||
|
|
||||||
builtin.TypeId.BoundFn,
|
builtin.TypeId.BoundFn,
|
||||||
builtin.TypeId.ComptimeFloat,
|
builtin.TypeId.ComptimeFloat,
|
||||||
|
Loading…
Reference in New Issue
Block a user