authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-07-23 18:39:58-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-07-23 18:39:58-07:00
logd92cca9324e71705af9134de70e1e995ba8aa57a
tree5898c30219cc799de4dddc30c8e84ef777f8897e
parentcc6964c5dc7a4d4c3081db06697b8ba0d7900b85

InternPool: add func_coerced handling to getFuncInstanceIes

Oops, there was a missing call to `unwrapCoercedFunc`.

1 files changed, 4 insertions(+), 2 deletions(-)

src/InternPool.zig+4-2
...@@ -4819,6 +4819,8 @@ pub fn getFuncInstanceIes(...@@ -4819,6 +4819,8 @@ pub fn getFuncInstanceIes(
4819 assert(arg.bare_return_type != .none);4819 assert(arg.bare_return_type != .none);
4820 for (arg.param_types) |param_type| assert(param_type != .none);4820 for (arg.param_types) |param_type| assert(param_type != .none);
48214821
4822 const generic_owner = unwrapCoercedFunc(ip, arg.generic_owner);
4823
4822 // The strategy here is to add the function decl unconditionally, then to4824 // The strategy here is to add the function decl unconditionally, then to
4823 // ask if it already exists, and if so, revert the lengths of the mutated4825 // ask if it already exists, and if so, revert the lengths of the mutated
4824 // arrays. This is similar to what `getOrPutTrailingString` does.4826 // arrays. This is similar to what `getOrPutTrailingString` does.
...@@ -4854,7 +4856,7 @@ pub fn getFuncInstanceIes(...@@ -4854,7 +4856,7 @@ pub fn getFuncInstanceIes(
4854 .owner_decl = undefined,4856 .owner_decl = undefined,
4855 .ty = func_ty,4857 .ty = func_ty,
4856 .branch_quota = 0,4858 .branch_quota = 0,
4857 .generic_owner = arg.generic_owner,4859 .generic_owner = generic_owner,
4858 });4860 });
4859 ip.extra.appendAssumeCapacity(@intFromEnum(Index.none)); // resolved error set4861 ip.extra.appendAssumeCapacity(@intFromEnum(Index.none)); // resolved error set
4860 ip.extra.appendSliceAssumeCapacity(@ptrCast(arg.comptime_args));4862 ip.extra.appendSliceAssumeCapacity(@ptrCast(arg.comptime_args));
...@@ -4927,7 +4929,7 @@ pub fn getFuncInstanceIes(...@@ -4927,7 +4929,7 @@ pub fn getFuncInstanceIes(
4927 return finishFuncInstance(4929 return finishFuncInstance(
4928 ip,4930 ip,
4929 gpa,4931 gpa,
4930 arg.generic_owner,4932 generic_owner,
4931 func_index,4933 func_index,
4932 func_extra_index,4934 func_extra_index,
4933 arg.generation,4935 arg.generation,