diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-07-18 20:40:33 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-07-18 20:40:33 +0200 |
commit | 24e9316560bd5c9ea2e5a963335aedff025e7f66 (patch) | |
tree | 6dfc77fa4bd70cea03de9c8eedab7f0899707af9 /src/eval.c | |
parent | 4db572eeb2b42819268e934e76c67163316d873f (diff) |
patch 8.2.3179: Vim9: cannot assign to an imported variable at script levelv8.2.3179
Problem: Vim9: cannot assign to an imported variable at script level.
Solution: Lookup imported items when assigning.
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c index 058b2d3bed..77774b738d 100644 --- a/src/eval.c +++ b/src/eval.c @@ -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); } } |