0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.4447: Vim9: can still use s:var in a compiled function

Problem:    Vim9: can still use s:var in a compiled function.
Solution:   Disallow using s:var for Vim9 script. (closes #9824)
This commit is contained in:
Bram Moolenaar
2022-02-22 20:43:36 +00:00
parent fe73255c92
commit afa048f0d4
5 changed files with 68 additions and 8 deletions

View File

@@ -1331,6 +1331,12 @@ compile_lhs(
char_u *rawname = lhs->lhs_name
+ (lhs->lhs_name[1] == ':' ? 2 : 0);
if (script_namespace && current_script_is_vim9())
{
semsg(_(e_cannot_use_s_colon_in_vim9_script_str),
var_start);
return FAIL;
}
if (is_decl)
{
if (script_namespace)