0
0
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:
Bram Moolenaar
2022-02-13 13:56:29 +00:00
parent cf6ad8ea8c
commit 75e27d78f5
4 changed files with 19 additions and 1 deletions

View File

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