mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user