Mercurial > vim
diff src/testdir/test_vim9_func.vim @ 25265:1d6ff96306fc v8.2.3169
patch 8.2.3169: Vim9: cannot handle nested inline function
Commit: https://github.com/vim/vim/commit/5245beb37cb52991a745644c20d7ca1b0138ef2c
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jul 15 22:03:50 2021 +0200
patch 8.2.3169: Vim9: cannot handle nested inline function
Problem: Vim9: cannot handle nested inline function.
Solution: Check for nested inline function. (closes https://github.com/vim/vim/issues/8575)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 15 Jul 2021 22:15:03 +0200 |
parents | e5d85e83a887 |
children | d26dc79c533f |
line wrap: on
line diff
--- a/src/testdir/test_vim9_func.vim +++ b/src/testdir/test_vim9_func.vim @@ -2255,6 +2255,16 @@ def Test_nested_inline_lambda() assert_equal('--there', F('unused')('there')('--')) END CheckScriptSuccess(lines) + + lines =<< trim END + vim9script + echo range(4)->mapnew((_, v) => { + return range(v) ->mapnew((_, s) => { + return string(s) + }) + }) + END + CheckScriptSuccess(lines) enddef def Shadowed(): list<number>