| ... | ... | @@ -7509,12 +7509,15 @@ fn instantiateGenericCall( |
| 7509 | 7509 | }; |
| 7510 | 7510 | defer child_sema.deinit(); |
| 7511 | 7511 | |
| 7512 | var wip_captures = try WipCaptureScope.init(gpa, sema.owner_decl.src_scope); |
| 7513 | defer wip_captures.deinit(); |
| 7514 | |
| 7512 | 7515 | var child_block: Block = .{ |
| 7513 | 7516 | .parent = null, |
| 7514 | 7517 | .sema = &child_sema, |
| 7515 | 7518 | .src_decl = generic_owner_func.owner_decl, |
| 7516 | 7519 | .namespace = namespace_index, |
| 7517 | | .wip_capture_scope = block.wip_capture_scope, |
| 7520 | .wip_capture_scope = wip_captures.scope, |
| 7518 | 7521 | .instructions = .{}, |
| 7519 | 7522 | .inlining = null, |
| 7520 | 7523 | .is_comptime = true, |
| ... | ... | @@ -7551,6 +7554,8 @@ fn instantiateGenericCall( |
| 7551 | 7554 | const func_ty = callee.ty.toType(); |
| 7552 | 7555 | const func_ty_info = mod.typeToFunc(func_ty).?; |
| 7553 | 7556 | |
| 7557 | try wip_captures.finalize(); |
| 7558 | |
| 7554 | 7559 | // If the call evaluated to a return type that requires comptime, never mind |
| 7555 | 7560 | // our generic instantiation. Instead we need to perform a comptime call. |
| 7556 | 7561 | if (try sema.typeRequiresComptime(func_ty_info.return_type.toType())) { |