| ... | ... | @@ -2623,7 +2623,18 @@ fn analyzeCall( |
| 2623 | 2623 | defer sema.fn_ret_ty = parent_fn_ret_ty; |
| 2624 | 2624 | |
| 2625 | 2625 | _ = try sema.analyzeBody(&child_block, fn_info.body); |
| 2626 | | break :res try sema.analyzeBlockBody(block, call_src, &child_block, merges); |
| 2626 | const result = try sema.analyzeBlockBody(block, call_src, &child_block, merges); |
| 2627 | |
| 2628 | // Much like in `Module.semaDecl`, if the result is a struct or union type, |
| 2629 | // we need to resolve the field type expressions right here, right now, while |
| 2630 | // the child `Sema` is still available, with the AIR instruction map intact, |
| 2631 | // because the field type expressions may reference into it. |
| 2632 | if (sema.typeOf(result).zigTypeTag() == .Type) { |
| 2633 | const ty = try sema.analyzeAsType(&child_block, call_src, result); |
| 2634 | try sema.resolveDeclFields(&child_block, call_src, ty); |
| 2635 | } |
| 2636 | |
| 2637 | break :res result; |
| 2627 | 2638 | } else if (func_ty_info.is_generic) res: { |
| 2628 | 2639 | const func_val = try sema.resolveConstValue(block, func_src, func); |
| 2629 | 2640 | const module_fn = func_val.castTag(.function).?.data; |