comparison src/vim9cmds.c @ 28281:bd1dcc605e58 v8.2.4666

patch 8.2.4666: Vim9: assignment not recognized in skipped block Commit: https://github.com/vim/vim/commit/97f8c1081ec6d6d158bb51e18fa23a36d3ed5623 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Apr 2 19:43:57 2022 +0100 patch 8.2.4666: Vim9: assignment not recognized in skipped block Problem: Vim9: assignment not recognized in skipped block. Solution: When skipping assume identifier exists. (closes https://github.com/vim/vim/issues/10059)
author Bram Moolenaar <Bram@vim.org>
date Sat, 02 Apr 2022 20:45:03 +0200
parents 49631bf057d3
children d550054e1328
comparison
equal deleted inserted replaced
28280:e998d4284855 28281:bd1dcc605e58
137 // unlet {list}[idx] 137 // unlet {list}[idx]
138 // unlet {dict}[key] dict.key 138 // unlet {dict}[key] dict.key
139 // 139 //
140 // Figure out the LHS type and other properties. 140 // Figure out the LHS type and other properties.
141 // 141 //
142 ret = compile_lhs(p, &lhs, CMD_unlet, FALSE, 0, cctx); 142 ret = compile_lhs(p, &lhs, CMD_unlet, FALSE, FALSE, 0, cctx);
143 143
144 // Use the info in "lhs" to unlet the item at the index in the 144 // Use the info in "lhs" to unlet the item at the index in the
145 // list or dict. 145 // list or dict.
146 if (ret == OK) 146 if (ret == OK)
147 { 147 {
2158 append = TRUE; 2158 append = TRUE;
2159 } 2159 }
2160 arg = skipwhite(arg); 2160 arg = skipwhite(arg);
2161 2161
2162 if (compile_assign_lhs(arg, lhs, CMD_redir, 2162 if (compile_assign_lhs(arg, lhs, CMD_redir,
2163 FALSE, FALSE, 1, cctx) == FAIL) 2163 FALSE, FALSE, FALSE, 1, cctx) == FAIL)
2164 return NULL; 2164 return NULL;
2165 if (need_type(&t_string, lhs->lhs_member_type, 2165 if (need_type(&t_string, lhs->lhs_member_type,
2166 -1, 0, cctx, FALSE, FALSE) == FAIL) 2166 -1, 0, cctx, FALSE, FALSE) == FAIL)
2167 return NULL; 2167 return NULL;
2168 generate_instr(cctx, ISN_REDIRSTART); 2168 generate_instr(cctx, ISN_REDIRSTART);