| ... | @@ -6373,9 +6373,9 @@ static IrInstruction *ir_gen_if_optional_expr(IrBuilder *irb, Scope *scope, AstN | ... | @@ -6373,9 +6373,9 @@ static IrInstruction *ir_gen_if_optional_expr(IrBuilder *irb, Scope *scope, AstN |
| 6373 | ZigVar *var = ir_create_var(irb, node, subexpr_scope, | 6373 | ZigVar *var = ir_create_var(irb, node, subexpr_scope, |
| 6374 | var_symbol, is_const, is_const, is_shadowable, is_comptime); | 6374 | var_symbol, is_const, is_const, is_shadowable, is_comptime); |
| 6375 | | 6375 | |
| 6376 | IrInstruction *var_ptr_value = ir_build_optional_unwrap_ptr(irb, subexpr_scope, node, maybe_val_ptr, false); | 6376 | IrInstruction *payload_ptr = ir_build_optional_unwrap_ptr(irb, subexpr_scope, node, maybe_val_ptr, false); |
| 6377 | IrInstruction *var_value = var_is_ptr ? var_ptr_value : ir_build_load_ptr(irb, subexpr_scope, node, var_ptr_value); | 6377 | IrInstruction *var_ptr = var_is_ptr ? ir_build_ref(irb, subexpr_scope, node, payload_ptr, true, false) : payload_ptr; |
| 6378 | ir_build_var_decl_src(irb, subexpr_scope, node, var, nullptr, var_value); | 6378 | ir_build_var_decl_src(irb, subexpr_scope, node, var, nullptr, var_ptr); |
| 6379 | var_scope = var->child_scope; | 6379 | var_scope = var->child_scope; |
| 6380 | } else { | 6380 | } else { |
| 6381 | var_scope = subexpr_scope; | 6381 | var_scope = subexpr_scope; |
| ... | @@ -6447,9 +6447,10 @@ static IrInstruction *ir_gen_if_err_expr(IrBuilder *irb, Scope *scope, AstNode * | ... | @@ -6447,9 +6447,10 @@ static IrInstruction *ir_gen_if_err_expr(IrBuilder *irb, Scope *scope, AstNode * |
| 6447 | ZigVar *var = ir_create_var(irb, node, subexpr_scope, | 6447 | ZigVar *var = ir_create_var(irb, node, subexpr_scope, |
| 6448 | var_symbol, var_is_const, var_is_const, is_shadowable, var_is_comptime); | 6448 | var_symbol, var_is_const, var_is_const, is_shadowable, var_is_comptime); |
| 6449 | | 6449 | |
| 6450 | IrInstruction *var_ptr_value = ir_build_unwrap_err_payload(irb, subexpr_scope, node, err_val_ptr, false); | 6450 | IrInstruction *payload_ptr = ir_build_unwrap_err_payload(irb, subexpr_scope, node, err_val_ptr, false); |
| 6451 | IrInstruction *var_value = var_is_ptr ? var_ptr_value : ir_build_load_ptr(irb, subexpr_scope, node, var_ptr_value); | 6451 | IrInstruction *var_ptr = var_is_ptr ? |
| 6452 | ir_build_var_decl_src(irb, subexpr_scope, node, var, nullptr, var_value); | 6452 | ir_build_ref(irb, subexpr_scope, node, payload_ptr, true, false) : payload_ptr; |
| | 6453 | ir_build_var_decl_src(irb, subexpr_scope, node, var, nullptr, var_ptr); |
| 6453 | var_scope = var->child_scope; | 6454 | var_scope = var->child_scope; |
| 6454 | } else { | 6455 | } else { |
| 6455 | var_scope = subexpr_scope; | 6456 | var_scope = subexpr_scope; |