| ... | @@ -8721,6 +8721,7 @@ fn callExpr( | ... | @@ -8721,6 +8721,7 @@ fn callExpr( |
| 8721 | defer arg_block.unstack(); | 8721 | defer arg_block.unstack(); |
| 8722 | | 8722 | |
| 8723 | // `call_inst` is reused to provide the param type. | 8723 | // `call_inst` is reused to provide the param type. |
| | 8724 | arg_block.rl_ty_inst = call_inst; |
| 8724 | const arg_ref = try expr(&arg_block, &arg_block.base, .{ .rl = .{ .coerced_ty = call_inst }, .ctx = .fn_arg }, param_node); | 8725 | const arg_ref = try expr(&arg_block, &arg_block.base, .{ .rl = .{ .coerced_ty = call_inst }, .ctx = .fn_arg }, param_node); |
| 8725 | _ = try arg_block.addBreak(.break_inline, call_index, arg_ref); | 8726 | _ = try arg_block.addBreak(.break_inline, call_index, arg_ref); |
| 8726 | | 8727 | |
| ... | @@ -10869,7 +10870,12 @@ const GenZir = struct { | ... | @@ -10869,7 +10870,12 @@ const GenZir = struct { |
| 10869 | // we emit ZIR for the block break instructions to have the result values, | 10870 | // we emit ZIR for the block break instructions to have the result values, |
| 10870 | // and then rvalue() on that to pass the value to the result location. | 10871 | // and then rvalue() on that to pass the value to the result location. |
| 10871 | switch (parent_ri.rl) { | 10872 | switch (parent_ri.rl) { |
| 10872 | .ty, .coerced_ty => |ty_inst| { | 10873 | .coerced_ty => |ty_inst| { |
| | 10874 | // Type coercion needs to happend before breaks. |
| | 10875 | gz.rl_ty_inst = ty_inst; |
| | 10876 | gz.break_result_info = .{ .rl = .{ .ty = ty_inst } }; |
| | 10877 | }, |
| | 10878 | .ty => |ty_inst| { |
| 10873 | gz.rl_ty_inst = ty_inst; | 10879 | gz.rl_ty_inst = ty_inst; |
| 10874 | gz.break_result_info = parent_ri; | 10880 | gz.break_result_info = parent_ri; |
| 10875 | }, | 10881 | }, |