aboutsummaryrefslogtreecommitdiff
path: root/src/type.zig
diff options
context:
space:
mode:
authorVeikka Tuominen <git@vexu.eu>2022-05-31 16:43:58 +0300
committerVeikka Tuominen <git@vexu.eu>2022-05-31 16:43:58 +0300
commit36df79cd3779b27a63f449618459603ce549660a (patch)
tree48b72df82c9f72a1151d1c5fc69ad8a09421a6cb /src/type.zig
parentfebc7d3cd63eefe91c7aaa95e3a274a0b44e353e (diff)
downloadzig-36df79cd3779b27a63f449618459603ce549660a.tar.gz
zig-36df79cd3779b27a63f449618459603ce549660a.zip
stage2: ignore generic return type when hashing function type
Generic parameter types are already ignored.
Diffstat (limited to 'src/type.zig')
-rw-r--r--src/type.zig4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/type.zig b/src/type.zig
index ebb8bfd7c3..638145e8b1 100644
--- a/src/type.zig
+++ b/src/type.zig
@@ -1036,7 +1036,9 @@ pub const Type = extern union {
std.hash.autoHash(hasher, std.builtin.TypeId.Fn);
const fn_info = ty.fnInfo();
- hashWithHasher(fn_info.return_type, hasher, mod);
+ if (fn_info.return_type.tag() != .generic_poison) {
+ hashWithHasher(fn_info.return_type, hasher, mod);
+ }
std.hash.autoHash(hasher, fn_info.alignment);
std.hash.autoHash(hasher, fn_info.cc);
std.hash.autoHash(hasher, fn_info.is_var_args);