0
0
mirror of https://github.com/vim/vim.git synced 2025-10-04 05:25:06 -04:00

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

@@ -1922,6 +1922,15 @@ def Test_script_var_shadows_command()
CheckDefAndScriptFailure(lines, 'E1207:', 2)
enddef
def Test_vim9script_call_wrong_type()
var lines =<< trim END
vim9script
var Time = 'localtime'
Time()
END
CheckScriptFailure(lines, 'E1085:')
enddef
def s:RetSome(): string
return 'some'
enddef