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)
diff --git a/src/vim9compile.c b/src/vim9compile.c
index b005ff2..02c75c4 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -422,6 +422,10 @@
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)