diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-06-08 22:01:53 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-06-08 22:01:53 +0200 |
commit | b55d618f193d9f413612d8d4e62758056e842e46 (patch) | |
tree | c853bc4eef70faf63cd7ba3c12f7a3ab6ee1dc2d /src/testdir/test_vim9_func.vim | |
parent | a733042b124357225e4081e10ef28591236c6077 (diff) |
patch 8.2.2965: Vim9: crash when calling function that failed to compilev8.2.2965
Problem: Vim9: crash when calling function that failed to compile.
Solution: Fail when trying to call the function. (closes #8344)
Diffstat (limited to 'src/testdir/test_vim9_func.vim')
-rw-r--r-- | src/testdir/test_vim9_func.vim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_func.vim b/src/testdir/test_vim9_func.vim index 7e21b37883..cd2a15d2da 100644 --- a/src/testdir/test_vim9_func.vim +++ b/src/testdir/test_vim9_func.vim @@ -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') |