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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user