diff options
| author | Veikka Tuominen <git@vexu.eu> | 2022-11-08 19:03:47 +0200 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2022-11-11 17:59:53 +0200 |
| commit | c4465556fdf14d87f718a7aced5210ec457c1f5a (patch) | |
| tree | 4873404b890e9a97aa972b14561a268688b9b9db /src/type.zig | |
| parent | cacfb0cfe4217a19872d62e248389bc522b36bf8 (diff) | |
| download | zig-c4465556fdf14d87f718a7aced5210ec457c1f5a.tar.gz zig-c4465556fdf14d87f718a7aced5210ec457c1f5a.zip | |
Type: check return_type for generic poison before comparing
Closes #13423
Diffstat (limited to 'src/type.zig')
| -rw-r--r-- | src/type.zig | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/type.zig b/src/type.zig index f24c89ef6f..cd3943a286 100644 --- a/src/type.zig +++ b/src/type.zig @@ -640,7 +640,9 @@ pub const Type = extern union { const a_info = a.fnInfo(); const b_info = b.fnInfo(); - if (!eql(a_info.return_type, b_info.return_type, mod)) + if (a_info.return_type.tag() != .generic_poison and + b_info.return_type.tag() != .generic_poison and + !eql(a_info.return_type, b_info.return_type, mod)) return false; if (a_info.is_var_args != b_info.is_var_args) |
