diff --git a/src/evalvars.c b/src/evalvars.c index a482453331..67abdcb1d5 100644 --- a/src/evalvars.c +++ b/src/evalvars.c @@ -3219,16 +3219,17 @@ set_var_const( goto failed; } + if (is_script_local && vim9script + && (flags & (ASSIGN_NO_DECL | ASSIGN_DECL)) == 0) + { + semsg(_(e_redefining_script_item_str), name); + goto failed; + } + if (var_in_vim9script) { where_T where; - if ((flags & (ASSIGN_NO_DECL | ASSIGN_DECL)) == 0) - { - semsg(_(e_redefining_script_item_str), name); - goto failed; - } - // check the type and adjust to bool if needed where.wt_index = var_idx; where.wt_variable = TRUE; diff --git a/src/version.c b/src/version.c index d448b94802..104073d316 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 2681, /**/ 2680, /**/