mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.4371: Vim9: can create a script variable from a legacy function
Problem: Vim9: can create a script variable from a legacy function. Solution: Disallow creating a script variable from a function.
This commit is contained in:
@@ -3504,6 +3504,12 @@ set_var_const(
|
||||
semsg(_(e_cannot_use_str_itself_it_is_imported), name);
|
||||
goto failed;
|
||||
}
|
||||
if (!in_vim9script())
|
||||
{
|
||||
semsg(_(e_cannot_create_vim9_script_variable_in_function_str),
|
||||
name);
|
||||
goto failed;
|
||||
}
|
||||
}
|
||||
|
||||
if (dest_tv == NULL)
|
||||
|
Reference in New Issue
Block a user