0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

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)
This commit is contained in:
Bram Moolenaar
2021-01-11 21:20:18 +01:00
parent 9e1d9e3473
commit 082517570d
7 changed files with 68 additions and 18 deletions

View File

@@ -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)