1
0
forked from aniani/vim

patch 8.0.0004

Problem:    A string argument for function() that is not a function name
            results in an error message with NULL. (Christian Brabandt)
Solution:   Use the argument for the error message.
This commit is contained in:
Bram Moolenaar
2016-09-14 22:16:13 +02:00
parent 789a5c0e3d
commit 5582ef1438
3 changed files with 6 additions and 1 deletions

View File

@@ -439,6 +439,9 @@ func Test_function_with_funcref()
let s:fref = function(s:f)
call assert_equal(v:t_string, s:fref('x'))
call assert_fails("call function('s:f')", 'E700:')
call assert_fails("call function('foo()')", 'E475:')
call assert_fails("call function('foo()')", 'foo()')
endfunc
func Test_funcref()