| ... | ... | @@ -940,6 +940,15 @@ pub fn analyzeBody( |
| 940 | 940 | const inst_data = datas[inst].pl_node; |
| 941 | 941 | const extra = sema.code.extraData(Zir.Inst.Block, inst_data.payload_index); |
| 942 | 942 | const inline_body = sema.code.extra[extra.end..][0..extra.data.body_len]; |
| 943 | // If this block contains a function prototype, we need to reset the |
| 944 | // current list of parameters and restore it later. |
| 945 | // Note: this probably needs to be resolved in a more general manner. |
| 946 | const prev_params = block.params; |
| 947 | block.params = .{}; |
| 948 | defer { |
| 949 | block.params.deinit(sema.gpa); |
| 950 | block.params = prev_params; |
| 951 | } |
| 943 | 952 | const break_inst = try sema.analyzeBody(block, inline_body); |
| 944 | 953 | const break_data = datas[break_inst].@"break"; |
| 945 | 954 | if (inst == break_data.block_inst) { |
| ... | ... | @@ -953,6 +962,15 @@ pub fn analyzeBody( |
| 953 | 962 | const inst_data = datas[inst].pl_node; |
| 954 | 963 | const extra = sema.code.extraData(Zir.Inst.Block, inst_data.payload_index); |
| 955 | 964 | const inline_body = sema.code.extra[extra.end..][0..extra.data.body_len]; |
| 965 | // If this block contains a function prototype, we need to reset the |
| 966 | // current list of parameters and restore it later. |
| 967 | // Note: this probably needs to be resolved in a more general manner. |
| 968 | const prev_params = block.params; |
| 969 | block.params = .{}; |
| 970 | defer { |
| 971 | block.params.deinit(sema.gpa); |
| 972 | block.params = prev_params; |
| 973 | } |
| 956 | 974 | const break_inst = try sema.analyzeBody(block, inline_body); |
| 957 | 975 | const break_data = datas[break_inst].@"break"; |
| 958 | 976 | if (inst == break_data.block_inst) { |