aboutsummaryrefslogtreecommitdiff
path: root/src/value.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/value.zig')
-rw-r--r--src/value.zig7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/value.zig b/src/value.zig
index 59cf9046f4..43c31905ca 100644
--- a/src/value.zig
+++ b/src/value.zig
@@ -2581,7 +2581,12 @@ pub const Value = extern union {
},
.Float, .ComptimeFloat => std.hash.autoHash(hasher, @bitCast(u128, val.toFloat(f128))),
.Bool, .Int, .ComptimeInt, .Pointer, .Fn => switch (val.tag()) {
- .slice => val.castTag(.slice).?.data.ptr.hashPtr(hasher, mod.getTarget()),
+ .slice => {
+ const slice = val.castTag(.slice).?.data;
+ var ptr_buf: Type.SlicePtrFieldTypeBuffer = undefined;
+ const ptr_ty = ty.slicePtrFieldType(&ptr_buf);
+ slice.ptr.hashUncoerced(ptr_ty, hasher, mod);
+ },
else => val.hashPtr(hasher, mod.getTarget()),
},
.Array, .Vector => {