forked from aniani/vim
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 #7525)
This commit is contained in:
@@ -301,6 +301,19 @@ def Test_nested_global_function()
|
||||
CheckScriptFailure(lines, "E122:")
|
||||
delfunc g:Inner
|
||||
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
def Outer()
|
||||
def g:Inner()
|
||||
echo map([1, 2, 3], {_, v -> v + 1})
|
||||
enddef
|
||||
g:Inner()
|
||||
enddef
|
||||
Outer()
|
||||
END
|
||||
CheckScriptSuccess(lines)
|
||||
delfunc g:Inner
|
||||
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
def Func()
|
||||
|
||||
Reference in New Issue
Block a user