forked from aniani/vim
patch 8.2.2965: Vim9: crash when calling function that failed to compile
Problem: Vim9: crash when calling function that failed to compile. Solution: Fail when trying to call the function. (closes #8344)
This commit is contained in:
@@ -74,6 +74,22 @@ def TestCompilingErrorInTry()
|
||||
delete('Xdir', 'rf')
|
||||
enddef
|
||||
|
||||
def Test_compile_error_in_called_function()
|
||||
var lines =<< trim END
|
||||
vim9script
|
||||
var n: number
|
||||
def Foo()
|
||||
&hls = n
|
||||
enddef
|
||||
def Bar()
|
||||
Foo()
|
||||
enddef
|
||||
silent! Foo()
|
||||
Bar()
|
||||
END
|
||||
CheckScriptFailureList(lines, ['E1012:', 'E1191:'])
|
||||
enddef
|
||||
|
||||
def Test_autoload_name_mismatch()
|
||||
var dir = 'Xdir/autoload'
|
||||
mkdir(dir, 'p')
|
||||
|
Reference in New Issue
Block a user