0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.3179: Vim9: cannot assign to an imported variable at script level

Problem:    Vim9: cannot assign to an imported variable at script level.
Solution:   Lookup imported items when assigning.
This commit is contained in:
Bram Moolenaar
2021-07-18 20:40:33 +02:00
parent 4db572eeb2
commit 24e9316560
5 changed files with 243 additions and 177 deletions

View File

@@ -1358,7 +1358,8 @@ set_var_lval(
|| (!var_check_ro(di->di_flags, lp->ll_name, FALSE)
&& !tv_check_lock(&di->di_tv, lp->ll_name, FALSE)))
&& tv_op(&tv, rettv, op) == OK)
set_var(lp->ll_name, &tv, FALSE);
set_var_const(lp->ll_name, NULL, &tv, FALSE,
ASSIGN_NO_DECL, 0);
clear_tv(&tv);
}
}