Mercurial > vim
diff src/testdir/test_partial.vim @ 8581:fd454847836d v7.4.1580
commit https://github.com/vim/vim/commit/7a5c46a9df7ef01a4f6a620861c35400d5ad28d9
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Mar 16 20:41:21 2016 +0100
patch 7.4.1580
Problem: Crash when using function reference. (Luchr)
Solution: Set initial refcount. (Ken Takata, closes https://github.com/vim/vim/issues/690)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 16 Mar 2016 20:45:05 +0100 |
parents | b5209a4e5baf |
children | 537bbbd4e987 |
line wrap: on
line diff
--- a/src/testdir/test_partial.vim +++ b/src/testdir/test_partial.vim @@ -68,3 +68,17 @@ func Test_partial_implicit() call assert_fails('call function(dict.MyFunc, ["bbb"], dict)', 'E924:') endfunc + +fun InnerCall(funcref) + return a:funcref +endfu + +fun OuterCall() + let opt = { 'func' : function('sin') } + call InnerCall(opt.func) +endfu + +func Test_function_in_dict() + call OuterCall() +endfunc +