Mercurial > vim
diff src/evalvars.c @ 23578:85ce241ff9e3 v8.2.2331
patch 8.2.2331: Vim9: wrong error when modifying dict declared with :final
Commit: https://github.com/vim/vim/commit/082517570d1dce2faf3baa9f752ce0858355d221
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jan 11 21:20:18 2021 +0100
patch 8.2.2331: Vim9: wrong error when modifying dict declared with :final
Problem: Vim9: wrong error when modifying dict declared with :final.
Solution: Do not check for writable variable when an index follows.
(closes #7657)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 11 Jan 2021 21:30:03 +0100 |
parents | 27ca5534a408 |
children | a9433f834693 |
line wrap: on
line diff
--- a/src/evalvars.c +++ b/src/evalvars.c @@ -3153,7 +3153,7 @@ set_var_const( // A Vim9 script-local variable is also present in sn_all_vars and // sn_var_vals. It may set "type" from "tv". if (is_script_local && vim9script) - update_vim9_script_var(FALSE, di, tv, &type); + update_vim9_script_var(FALSE, di, flags, tv, &type); } // existing variable, need to clear the value @@ -3243,7 +3243,7 @@ set_var_const( // A Vim9 script-local variable is also added to sn_all_vars and // sn_var_vals. It may set "type" from "tv". if (is_script_local && vim9script) - update_vim9_script_var(TRUE, di, tv, &type); + update_vim9_script_var(TRUE, di, flags, tv, &type); } if (copy || tv->v_type == VAR_NUMBER || tv->v_type == VAR_FLOAT)