diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-09-13 18:57:47 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-09-13 18:57:47 +0200 |
commit | f0afd9e18227d3459c888584d0658a1837d2aaf8 (patch) | |
tree | 58d6fe28100f18052a7c848f3db0fd592ba8356e /src/testdir/test_vim9_script.vim | |
parent | b806aa5bd910dba94fbde586f6019b4825813d28 (diff) |
patch 8.2.1674: Vim9: internal error when using variable that was not setv8.2.1674
Problem: Vim9: internal error when using variable that was not set.
Solution: Give a meaningful error. (closes #6937)
Diffstat (limited to 'src/testdir/test_vim9_script.vim')
-rw-r--r-- | src/testdir/test_vim9_script.vim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_script.vim b/src/testdir/test_vim9_script.vim index bd0a5c8748..27dbd30d26 100644 --- a/src/testdir/test_vim9_script.vim +++ b/src/testdir/test_vim9_script.vim @@ -3308,6 +3308,14 @@ def Test_invalid_sid() delete('Xdidit') enddef +def Test_unset_any_variable() + let lines =<< trim END + let var: any + assert_equal(0, var) + END + CheckDefAndScriptSuccess(lines) +enddef + " Keep this last, it messes up highlighting. def Test_substitute_cmd() new |