diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-08-29 17:47:08 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-08-29 17:47:08 +0200 |
commit | 95006e3dca099d3dc73d70d9872660308106e86c (patch) | |
tree | 81cbe06b973d855503dadca014d76c788bcbb566 /src/testdir/test_vim9_script.vim | |
parent | 98945560c1ae6e2ddee820a7de718a36e3f4b6e5 (diff) |
patch 8.2.1541: Vim9: cannot find function reference for s:Funcv8.2.1541
Problem: Vim9: cannot find function reference for s:Func.
Solution: Recognize <SNR> prefix. (closes #6805)
Diffstat (limited to 'src/testdir/test_vim9_script.vim')
-rw-r--r-- | src/testdir/test_vim9_script.vim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_script.vim b/src/testdir/test_vim9_script.vim index 49aacb0fab..662024cbd6 100644 --- a/src/testdir/test_vim9_script.vim +++ b/src/testdir/test_vim9_script.vim @@ -1652,6 +1652,10 @@ def Test_vim9script_reload_import() delete('Ximport.vim') enddef +def s:RetSome(): string + return 'some' +enddef + " Not exported function that is referenced needs to be accessed by the " script-local name. def Test_vim9script_funcref() @@ -1683,6 +1687,9 @@ def Test_vim9script_funcref() unlet g:result delete('Xsort.vim') delete('Xscript.vim') + + let Funcref = function('s:RetSome') + assert_equal('some', Funcref()) enddef " Check that when searching for "FilterFunc" it finds the import in the |