0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.1541: Vim9: cannot find function reference for s:Func

Problem:    Vim9: cannot find function reference for s:Func.
Solution:   Recognize <SNR> prefix. (closes #6805)
This commit is contained in:
Bram Moolenaar
2020-08-29 17:47:08 +02:00
parent 98945560c1
commit 95006e3dca
4 changed files with 31 additions and 4 deletions

View File

@@ -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