| ... | ... | @@ -28499,7 +28499,13 @@ fn resolveInferredErrorSet( |
| 28499 | 28499 | // in this case, it may be a generic function which would cause an assertion failure |
| 28500 | 28500 | // if we called `ensureFuncBodyAnalyzed` on it here. |
| 28501 | 28501 | const ies_func_owner_decl = sema.mod.declPtr(ies.func.owner_decl); |
| 28502 | | if (ies_func_owner_decl.ty.fnInfo().return_type.errorUnionSet().castTag(.error_set_inferred).?.data == ies) { |
| 28502 | const ies_func_info = ies_func_owner_decl.ty.fnInfo(); |
| 28503 | // if ies declared by a inline function with generic return type, the return_type should be generic_poison, |
| 28504 | // because inline function does not create a new declaration, and the ies has been filled with analyzeCall, |
| 28505 | // so here we can simply skip this case. |
| 28506 | if (ies_func_info.return_type.tag() == .generic_poison) { |
| 28507 | assert(ies_func_info.cc == .Inline); |
| 28508 | } else if (ies_func_info.return_type.errorUnionSet().castTag(.error_set_inferred).?.data == ies) { |
| 28503 | 28509 | // In this case we are dealing with the actual InferredErrorSet object that |
| 28504 | 28510 | // corresponds to the function, not one created to track an inline/comptime call. |
| 28505 | 28511 | try sema.ensureFuncBodyAnalyzed(ies.func); |