Mercurial > vim
changeset 24420:e0fa539a9b34 v8.2.2750
patch 8.2.2750: Vim9: error for using underscore in nested function
Commit: https://github.com/vim/vim/commit/da479c7597a61c4d50c842df21c9294bd9bf1037
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Apr 10 21:01:38 2021 +0200
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 https://github.com/vim/vim/issues/8096)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 10 Apr 2021 21:15:04 +0200 |
parents | 05c9ccb777ec |
children | 8ce7f56493bd |
files | src/testdir/test_vim9_func.vim src/version.c src/vim9compile.c |
diffstat | 3 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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)