Problem: Vim9: test fails for redeclaring script variable.
Solution: It's OK to assign to an existing script variable in legacy.
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;
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2681,
/**/
2680,
/**/