0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14: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:
Bram Moolenaar
2021-12-25 19:58:22 +00:00
parent ae1068afde
commit db8e5c21b9
2 changed files with 17 additions and 0 deletions

View File

@@ -647,6 +647,21 @@ def Test_nested_function()
END END
CheckDefFailure(lines, 'E1117:') 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 # nested function inside conditional
lines =<< trim END lines =<< trim END
vim9script vim9script

View File

@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
3896,
/**/ /**/
3895, 3895,
/**/ /**/