diff --git a/src/testdir/test_vim9_func.vim b/src/testdir/test_vim9_func.vim index 6b353dd699..a97146d45b 100644 --- a/src/testdir/test_vim9_func.vim +++ b/src/testdir/test_vim9_func.vim @@ -2637,6 +2637,8 @@ def Test_ignored_argument() return _ endfunc assert_equal('too', Oktoo()) + + assert_equal([[1], [2], [3]], range(3)->mapnew((_, v) => [v]->map((_, w) => w + 1))) END CheckScriptSuccess(lines) diff --git a/src/version.c b/src/version.c index 7785ac37cd..ed2237532d 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 2750, /**/ 2749, /**/ diff --git a/src/vim9compile.c b/src/vim9compile.c index b005ff2365..02c75c4d6a 100644 --- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -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)