| ... | ... | @@ -5137,7 +5137,7 @@ fn analyzeFancyFunction( |
| 5137 | 5137 | file, |
| 5138 | 5138 | scope, |
| 5139 | 5139 | parent_src, |
| 5140 | | fn_info.body[0], |
| 5140 | fn_info.body, |
| 5141 | 5141 | call_ctx, |
| 5142 | 5142 | ); |
| 5143 | 5143 | } else { |
| ... | ... | @@ -5303,7 +5303,7 @@ fn analyzeFunction( |
| 5303 | 5303 | file, |
| 5304 | 5304 | scope, |
| 5305 | 5305 | parent_src, |
| 5306 | | fn_info.body[0], |
| 5306 | fn_info.body, |
| 5307 | 5307 | call_ctx, |
| 5308 | 5308 | ); |
| 5309 | 5309 | } else { |
| ... | ... | @@ -5350,17 +5350,10 @@ fn getGenericReturnType( |
| 5350 | 5350 | file: *File, |
| 5351 | 5351 | scope: *Scope, |
| 5352 | 5352 | parent_src: SrcLocInfo, // function decl line |
| 5353 | | body_main_block: Zir.Inst.Index, |
| 5353 | body: []const Zir.Inst.Index, |
| 5354 | 5354 | call_ctx: ?*const CallContext, |
| 5355 | 5355 | ) !DocData.Expr { |
| 5356 | 5356 | const tags = file.zir.instructions.items(.tag); |
| 5357 | | const data = file.zir.instructions.items(.data); |
| 5358 | | |
| 5359 | | // We expect `body_main_block` to be the first instruction |
| 5360 | | // inside the function body, and for it to be a block instruction. |
| 5361 | | const pl_node = data[@intFromEnum(body_main_block)].pl_node; |
| 5362 | | const extra = file.zir.extraData(Zir.Inst.Block, pl_node.payload_index); |
| 5363 | | const body = file.zir.bodySlice(extra.end, extra.data.body_len); |
| 5364 | 5357 | if (body.len >= 4) { |
| 5365 | 5358 | const maybe_ret_inst = body[body.len - 4]; |
| 5366 | 5359 | switch (tags[@intFromEnum(maybe_ret_inst)]) { |