mirror of
https://github.com/vim/vim.git
synced 2025-09-28 04:24:06 -04:00
patch 8.2.3896: Vim9: no test for nested function not available later
Problem: Vim9: no test for nested function not available later. Solution: Add a test.
This commit is contained in:
@@ -647,6 +647,21 @@ def Test_nested_function()
|
||||
END
|
||||
CheckDefFailure(lines, 'E1117:')
|
||||
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
def Outer()
|
||||
def Inner()
|
||||
g:result = 'ok'
|
||||
enddef
|
||||
Inner()
|
||||
enddef
|
||||
Outer()
|
||||
Inner()
|
||||
END
|
||||
CheckScriptFailure(lines, 'E117: Unknown function: Inner')
|
||||
assert_equal('ok', g:result)
|
||||
unlet g:result
|
||||
|
||||
# nested function inside conditional
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
|
@@ -749,6 +749,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
3896,
|
||||
/**/
|
||||
3895,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user