| ... | @@ -2623,10 +2623,9 @@ fn zirResolveInferredAlloc(sema: *Sema, block: *Block, inst: Zir.Inst.Index) Com | ... | @@ -2623,10 +2623,9 @@ fn zirResolveInferredAlloc(sema: *Sema, block: *Block, inst: Zir.Inst.Index) Com |
| 2623 | // block so that codegen does not see it. | 2623 | // block so that codegen does not see it. |
| 2624 | block.instructions.shrinkRetainingCapacity(block.instructions.items.len - 3); | 2624 | block.instructions.shrinkRetainingCapacity(block.instructions.items.len - 3); |
| 2625 | sema.air_values.items[value_index] = try Value.Tag.decl_ref.create(sema.arena, new_decl); | 2625 | sema.air_values.items[value_index] = try Value.Tag.decl_ref.create(sema.arena, new_decl); |
| 2626 | // Would be nice if we could just assign `bitcast_ty_ref` to | 2626 | // if bitcast ty ref needs to be made const, make_ptr_const |
| 2627 | // `air_datas[ptr_inst].ty_pl.ty`, wouldn't it? Alas, that is almost correct, | 2627 | // ZIR handles it later, so we can just use the ty ref here. |
| 2628 | // except that the pointer is mutable and we need to make it constant here. | 2628 | air_datas[ptr_inst].ty_pl.ty = air_datas[bitcast_inst].ty_op.ty; |
| 2629 | air_datas[ptr_inst].ty_pl.ty = try sema.addType(final_ptr_ty); | | |
| 2630 | | 2629 | |
| 2631 | return; | 2630 | return; |
| 2632 | } | 2631 | } |