diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-07-23 18:39:58 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-07-23 18:39:58 -0700 |
| commit | d92cca9324e71705af9134de70e1e995ba8aa57a (patch) | |
| tree | 5898c30219cc799de4dddc30c8e84ef777f8897e /src/InternPool.zig | |
| parent | cc6964c5dc7a4d4c3081db06697b8ba0d7900b85 (diff) | |
| download | zig-d92cca9324e71705af9134de70e1e995ba8aa57a.tar.gz zig-d92cca9324e71705af9134de70e1e995ba8aa57a.zip | |
InternPool: add func_coerced handling to getFuncInstanceIes
Oops, there was a missing call to `unwrapCoercedFunc`.
Diffstat (limited to 'src/InternPool.zig')
| -rw-r--r-- | src/InternPool.zig | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/InternPool.zig b/src/InternPool.zig index 8a160d9e39..0c01c9988c 100644 --- a/src/InternPool.zig +++ b/src/InternPool.zig @@ -4819,6 +4819,8 @@ pub fn getFuncInstanceIes( assert(arg.bare_return_type != .none); for (arg.param_types) |param_type| assert(param_type != .none); + const generic_owner = unwrapCoercedFunc(ip, arg.generic_owner); + // The strategy here is to add the function decl unconditionally, then to // ask if it already exists, and if so, revert the lengths of the mutated // arrays. This is similar to what `getOrPutTrailingString` does. @@ -4854,7 +4856,7 @@ pub fn getFuncInstanceIes( .owner_decl = undefined, .ty = func_ty, .branch_quota = 0, - .generic_owner = arg.generic_owner, + .generic_owner = generic_owner, }); ip.extra.appendAssumeCapacity(@intFromEnum(Index.none)); // resolved error set ip.extra.appendSliceAssumeCapacity(@ptrCast(arg.comptime_args)); @@ -4927,7 +4929,7 @@ pub fn getFuncInstanceIes( return finishFuncInstance( ip, gpa, - arg.generic_owner, + generic_owner, func_index, func_extra_index, arg.generation, |
