| ... | ... | @@ -8818,9 +8818,12 @@ fn analyzeRef( |
| 8818 | 8818 | |
| 8819 | 8819 | try sema.requireRuntimeBlock(block, src); |
| 8820 | 8820 | const ptr_type = try Module.simplePtrType(sema.arena, operand_ty, false, .One); |
| 8821 | | const alloc = try block.addTy(.alloc, ptr_type); |
| 8821 | const mut_ptr_type = try Module.simplePtrType(sema.arena, operand_ty, true, .One); |
| 8822 | const alloc = try block.addTy(.alloc, mut_ptr_type); |
| 8822 | 8823 | try sema.storePtr(block, src, alloc, operand); |
| 8823 | | return alloc; |
| 8824 | |
| 8825 | // TODO: Replace with sema.coerce when that supports adding pointer constness. |
| 8826 | return sema.bitcast(block, ptr_type, alloc, src); |
| 8824 | 8827 | } |
| 8825 | 8828 | |
| 8826 | 8829 | fn analyzeLoad( |