0
0
mirror of https://github.com/vim/vim.git synced 2025-10-18 07:54:29 -04:00

patch 8.2.0771: Vim9: cannot call a compiled closure from not compiled code

Problem:    Vim9: cannot call a compiled closure from not compiled code.
Solution:   Pass funcexe to call_user_func().
This commit is contained in:
Bram Moolenaar
2020-05-16 21:20:12 +02:00
parent aa5fc4ec51
commit 6f5b6dfb16
6 changed files with 34 additions and 17 deletions

View File

@@ -792,5 +792,15 @@ def Test_nested_closure()
assert_equal('text!!!', Closure('!!!'))
enddef
func GetResult(Ref)
return a:Ref('some')
endfunc
def Test_call_closure_not_compiled()
let text = 'text'
g:Ref = {s -> s .. text}
assert_equal('sometext', GetResult(g:Ref))
enddef
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker