vim-patch:8.2.2722: Vim9: crash when using LHS with double index

Problem:    Vim9: crash when using LHS with double index.
Solution:   Handle lhs_dest which is "dest_expr". (closes vim/vim#8068)
            Fix confusing error message for missing dict item.

b9c0cd897a

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq 2022-11-06 06:46:30 +08:00
parent 1f0bf65ad6
commit a208a8b10e

View File

@ -1757,7 +1757,7 @@ void set_var_lval(lval_T *lp, char *endp, typval_T *rettv, int copy, const bool
// Assign to a List or Dictionary item. // Assign to a List or Dictionary item.
if (lp->ll_newkey != NULL) { if (lp->ll_newkey != NULL) {
if (op != NULL && *op != '=') { if (op != NULL && *op != '=') {
semsg(_(e_letwrong), op); semsg(_(e_dictkey), lp->ll_newkey);
return; return;
} }