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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user