| ... | ... | @@ -29836,6 +29836,7 @@ fn coerceExtra( |
| 29836 | 29836 | if (dest_ty.isGenericPoison()) return inst; |
| 29837 | 29837 | const pt = sema.pt; |
| 29838 | 29838 | const zcu = pt.zcu; |
| 29839 | const ip = &zcu.intern_pool; |
| 29839 | 29840 | const dest_ty_src = inst_src; // TODO better source location |
| 29840 | 29841 | try dest_ty.resolveFields(pt); |
| 29841 | 29842 | const inst_ty = sema.typeOf(inst); |
| ... | ... | @@ -30458,7 +30459,7 @@ fn coerceExtra( |
| 30458 | 30459 | errdefer msg.destroy(sema.gpa); |
| 30459 | 30460 | |
| 30460 | 30461 | const ret_ty_src: LazySrcLoc = .{ |
| 30461 | | .base_node_inst = sema.getOwnerFuncDeclInst(), |
| 30462 | .base_node_inst = ip.getNav(zcu.funcInfo(sema.func_index).owner_nav).srcInst(ip), |
| 30462 | 30463 | .offset = .{ .node_offset_fn_type_ret_ty = 0 }, |
| 30463 | 30464 | }; |
| 30464 | 30465 | try sema.errNote(ret_ty_src, msg, "'noreturn' declared here", .{}); |
| ... | ... | @@ -30496,10 +30497,10 @@ fn coerceExtra( |
| 30496 | 30497 | |
| 30497 | 30498 | // Add notes about function return type |
| 30498 | 30499 | if (opts.is_ret and |
| 30499 | | !zcu.test_functions.contains(zcu.funcInfo(sema.owner.unwrap().func).owner_nav)) |
| 30500 | !zcu.test_functions.contains(zcu.funcInfo(sema.func_index).owner_nav)) |
| 30500 | 30501 | { |
| 30501 | 30502 | const ret_ty_src: LazySrcLoc = .{ |
| 30502 | | .base_node_inst = sema.getOwnerFuncDeclInst(), |
| 30503 | .base_node_inst = ip.getNav(zcu.funcInfo(sema.func_index).owner_nav).srcInst(ip), |
| 30503 | 30504 | .offset = .{ .node_offset_fn_type_ret_ty = 0 }, |
| 30504 | 30505 | }; |
| 30505 | 30506 | if (inst_ty.isError(zcu) and !dest_ty.isError(zcu)) { |