0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.2750: Vim9: error for using underscore in nested function

Problem:    Vim9: error for using underscore in nested function.
Solution:   Do not consider "_" already defined. (closes #8096)
This commit is contained in:
Bram Moolenaar
2021-04-10 21:01:38 +02:00
parent fe95b94ffa
commit da479c7597
3 changed files with 8 additions and 0 deletions

View File

@@ -422,6 +422,10 @@ check_defined(char_u *p, size_t len, cctx_T *cctx, int is_arg)
int c = p[len];
ufunc_T *ufunc = NULL;
// underscore argument is OK
if (len == 1 && *p == '_')
return OK;
if (script_var_exists(p, len, cctx) == OK)
{
if (is_arg)