Mercurial > vim
comparison src/testdir/test_vim9_func.vim @ 23291:8e1427ac2bce v8.2.2191
patch 8.2.2191: Vim9: using wrong name with lambda in nested function
Commit: https://github.com/vim/vim/commit/58a52f215a568b32c8a3aec0ccdb383f1a76dba0
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Dec 22 18:56:55 2020 +0100
patch 8.2.2191: Vim9: using wrong name with lambda in nested function
Problem: Vim9: using wrong name with lambda in nested function.
Solution: Copy the lambda name earlier. (closes https://github.com/vim/vim/issues/7525)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 22 Dec 2020 19:00:06 +0100 |
parents | ac701146c708 |
children | d9ae7dd3a0f2 |
comparison
equal
deleted
inserted
replaced
23290:bbda7e5d2c51 | 23291:8e1427ac2bce |
---|---|
297 defcompile | 297 defcompile |
298 Outer() | 298 Outer() |
299 Outer() | 299 Outer() |
300 END | 300 END |
301 CheckScriptFailure(lines, "E122:") | 301 CheckScriptFailure(lines, "E122:") |
302 delfunc g:Inner | |
303 | |
304 lines =<< trim END | |
305 vim9script | |
306 def Outer() | |
307 def g:Inner() | |
308 echo map([1, 2, 3], {_, v -> v + 1}) | |
309 enddef | |
310 g:Inner() | |
311 enddef | |
312 Outer() | |
313 END | |
314 CheckScriptSuccess(lines) | |
302 delfunc g:Inner | 315 delfunc g:Inner |
303 | 316 |
304 lines =<< trim END | 317 lines =<< trim END |
305 vim9script | 318 vim9script |
306 def Func() | 319 def Func() |