From 1e3c0efa0f3d41563f91097d04b3616848d5eb62 Mon Sep 17 00:00:00 2001 From: Michael Ennen Date: Sat, 17 Dec 2016 18:01:24 -0700 Subject: vim-patch:7.4.2134 Problem: No error for using function() badly. Solution: Check for passing wrong function name. (Ken Takata) https://github.com/vim/vim/commit/b54c3ff3174dbb5dfbfcabdf95200b047beaa644 --- src/nvim/testdir/test_expr.vim | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_expr.vim b/src/nvim/testdir/test_expr.vim index 0c4a91298c..7e43af9ebd 100644 --- a/src/nvim/testdir/test_expr.vim +++ b/src/nvim/testdir/test_expr.vim @@ -143,3 +143,10 @@ func Test_substitute_expr_arg() call assert_fails("call substitute('xxx', '.', {m -> string(extend(m, ['x']))}, '')", 'E742:') call assert_fails("call substitute('xxx', '.', {m -> string(remove(m, 1))}, '')", 'E742:') endfunc + +func Test_function_with_funcref() + let s:f = function('type') + let s:fref = function(s:f) + call assert_equal(v:t_string, s:fref('x')) + call assert_fails("call function('s:f')", 'E700:') +endfunc -- cgit