Commit d92cca9324

Andrew Kelley <andrew@ziglang.org>
2023-07-24 03:39:58
InternPool: add func_coerced handling to getFuncInstanceIes
Oops, there was a missing call to `unwrapCoercedFunc`.
1 parent cc6964c
Changed files (1)
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,