1
0
forked from aniani/vim

patch 8.2.3783: confusing error for using a variable as a function

Problem:    Confusing error for using a variable as a function.
Solution:   If a function is not found but there is a variable, give a more
            useful error. (issue #9310)
This commit is contained in:
Bram Moolenaar
2021-12-11 16:14:07 +00:00
parent 052ff291d7
commit 2ef9156b42
9 changed files with 51 additions and 19 deletions

View File

@@ -1459,7 +1459,7 @@ endfunc
def Test_call_funcref()
g:SomeFunc('abc')->assert_equal(3)
assert_fails('NotAFunc()', 'E117:', '', 2, 'Test_call_funcref') # comment after call
assert_fails('g:NotAFunc()', 'E117:', '', 3, 'Test_call_funcref')
assert_fails('g:NotAFunc()', 'E1085:', '', 3, 'Test_call_funcref')
var lines =<< trim END
vim9script