# HG changeset patch # User Bram Moolenaar # Date 1640462403 -3600 # Node ID 44c7d42dff25b2d5e3d51676517e7b5558e6889e # Parent f5c8c084a57695af555fd675513b9ade4fde36a4 patch 8.2.3896: Vim9: no test for nested function not available later Commit: https://github.com/vim/vim/commit/db8e5c21b98c5998df4ab94e0b94bd9fdaf35c83 Author: Bram Moolenaar Date: Sat Dec 25 19:58:22 2021 +0000 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. diff --git a/src/testdir/test_vim9_func.vim b/src/testdir/test_vim9_func.vim --- a/src/testdir/test_vim9_func.vim +++ b/src/testdir/test_vim9_func.vim @@ -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 diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 3896, +/**/ 3895, /**/ 3894,