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(
48194819 assert(arg.bare_return_type != .none);
48204820 for (arg.param_types) |param_type| assert(param_type != .none);
48214821
4822 const generic_owner = unwrapCoercedFunc(ip, arg.generic_owner);
4823
48224824 // The strategy here is to add the function decl unconditionally, then to
48234825 // ask if it already exists, and if so, revert the lengths of the mutated
48244826 // arrays. This is similar to what `getOrPutTrailingString` does.
......@@ -4854,7 +4856,7 @@ pub fn getFuncInstanceIes(
48544856 .owner_decl = undefined,
48554857 .ty = func_ty,
48564858 .branch_quota = 0,
4857 .generic_owner = arg.generic_owner,
4859 .generic_owner = generic_owner,
48584860 });
48594861 ip.extra.appendAssumeCapacity(@intFromEnum(Index.none)); // resolved error set
48604862 ip.extra.appendSliceAssumeCapacity(@ptrCast(arg.comptime_args));
......@@ -4927,7 +4929,7 @@ pub fn getFuncInstanceIes(
49274929 return finishFuncInstance(
49284930 ip,
49294931 gpa,
4930 arg.generic_owner,
4932 generic_owner,
49314933 func_index,
49324934 func_extra_index,
49334935 arg.generation,