forked from aniani/vim
patch 8.2.1024: Vim9: no error for using "let g:var = val"
Problem: Vim9: no error for using "let g:var = val". Solution: Add an error.
This commit is contained in:
@@ -3325,6 +3325,9 @@ def_function(exarg_T *eap, char_u *name_arg)
|
||||
|
||||
if (eap->cmdidx == CMD_def)
|
||||
set_function_type(fp);
|
||||
else if (fp->uf_script_ctx.sc_version == SCRIPT_VERSION_VIM9)
|
||||
// :func does not use Vim9 script syntax, even in a Vim9 script file
|
||||
fp->uf_script_ctx.sc_version = SCRIPT_VERSION_MAX;
|
||||
|
||||
goto ret_free;
|
||||
|
||||
|
Reference in New Issue
Block a user