diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-07-18 13:42:29 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-07-18 13:42:29 +0200 |
commit | c6ba2f9dde6d01c8ab356c239c2259f7d83652a4 (patch) | |
tree | c1e27d14ae92ba1ffd4f034031f2f18b773d01d5 /src/testdir | |
parent | 47bc9c333766ee3d45cb18c583a630e4ad53405a (diff) |
patch 8.2.3175: Vim9: using illegal pointer with nested lambdas.v8.2.3175
Problem: Vim9: using illegal pointer with inline function inside a lambda.
Solution: Clear eval_tofree_cmdline when advancing to the next line.
(closes #8578)
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_vim9_func.vim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_func.vim b/src/testdir/test_vim9_func.vim index c89c13e2dc..a2c4e7daed 100644 --- a/src/testdir/test_vim9_func.vim +++ b/src/testdir/test_vim9_func.vim @@ -2265,6 +2265,22 @@ def Test_nested_inline_lambda() }) END CheckScriptSuccess(lines) + + lines =<< trim END + vim9script + + def s:func() + range(10) + ->mapnew((_, _) => ({ + key: range(10)->mapnew((_, _) => { + return ' ' + }), + })) + enddef + + defcomp + END + CheckScriptSuccess(lines) enddef def Shadowed(): list<number> |