comparison src/testdir/test_vim9_func.vim @ 20433:5950284a517f v8.2.0771

patch 8.2.0771: Vim9: cannot call a compiled closure from not compiled code Commit: https://github.com/vim/vim/commit/6f5b6dfb16228c0ce1e4379b7bafed02eaddbab2 Author: Bram Moolenaar <Bram@vim.org> Date: Sat May 16 21:20:12 2020 +0200 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().
author Bram Moolenaar <Bram@vim.org>
date Sat, 16 May 2020 21:30:10 +0200
parents fc2d76e0994c
children 489cb75c76b6
comparison
equal deleted inserted replaced
20432:05b26264315a 20433:5950284a517f
790 return local .. arg 790 return local .. arg
791 enddef 791 enddef
792 assert_equal('text!!!', Closure('!!!')) 792 assert_equal('text!!!', Closure('!!!'))
793 enddef 793 enddef
794 794
795 func GetResult(Ref)
796 return a:Ref('some')
797 endfunc
798
799 def Test_call_closure_not_compiled()
800 let text = 'text'
801 g:Ref = {s -> s .. text}
802 assert_equal('sometext', GetResult(g:Ref))
803 enddef
804
795 805
796 " vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker 806 " vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker