Skip to content

Commit fd2a19c

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 9c95c4f + 5582ef1 commit fd2a19c

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

src/evalfunc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3612,7 +3612,7 @@ common_function(typval_T *argvars, typval_T *rettv, int is_funcref)
36123612

36133613
if (s == NULL || *s == NUL || (use_string && VIM_ISDIGIT(*s))
36143614
|| (is_funcref && trans_name == NULL))
3615-
EMSG2(_(e_invarg2), s);
3615+
EMSG2(_(e_invarg2), use_string ? get_tv_string(&argvars[0]) : s);
36163616
/* Don't check an autoload name for existence here. */
36173617
else if (trans_name != NULL && (is_funcref
36183618
? find_func(trans_name) == NULL

src/testdir/test_expr.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,9 @@ func Test_function_with_funcref()
439439
let s:fref = function(s:f)
440440
call assert_equal(v:t_string, s:fref('x'))
441441
call assert_fails("call function('s:f')", 'E700:')
442+
443+
call assert_fails("call function('foo()')", 'E475:')
444+
call assert_fails("call function('foo()')", 'foo()')
442445
endfunc
443446

444447
func Test_funcref()

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,8 @@ static char *(features[]) =
779779

780780
static int included_patches[] =
781781
{ /* Add new patch number below this line */
782+
/**/
783+
4,
782784
/**/
783785
3,
784786
/**/

0 commit comments

Comments
 (0)