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:
@@ -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
|
||||
|
Reference in New Issue
Block a user