Mercurial > vim
comparison src/testdir/test_vim9_script.vim @ 22250:dd42235ed626 v8.2.1674
patch 8.2.1674: Vim9: internal error when using variable that was not set
Commit: https://github.com/vim/vim/commit/f0afd9e18227d3459c888584d0658a1837d2aaf8
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Sep 13 18:57:47 2020 +0200
patch 8.2.1674: Vim9: internal error when using variable that was not set
Problem: Vim9: internal error when using variable that was not set.
Solution: Give a meaningful error. (closes https://github.com/vim/vim/issues/6937)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 13 Sep 2020 19:00:08 +0200 |
parents | 7899b4e2880c |
children | e0a4d029cb87 |
comparison
equal
deleted
inserted
replaced
22249:ef6c936e63fb | 22250:dd42235ed626 |
---|---|
3306 assert_equal([], readfile('Xdidit')) | 3306 assert_equal([], readfile('Xdidit')) |
3307 endif | 3307 endif |
3308 delete('Xdidit') | 3308 delete('Xdidit') |
3309 enddef | 3309 enddef |
3310 | 3310 |
3311 def Test_unset_any_variable() | |
3312 let lines =<< trim END | |
3313 let var: any | |
3314 assert_equal(0, var) | |
3315 END | |
3316 CheckDefAndScriptSuccess(lines) | |
3317 enddef | |
3318 | |
3311 " Keep this last, it messes up highlighting. | 3319 " Keep this last, it messes up highlighting. |
3312 def Test_substitute_cmd() | 3320 def Test_substitute_cmd() |
3313 new | 3321 new |
3314 setline(1, 'something') | 3322 setline(1, 'something') |
3315 :substitute(some(other( | 3323 :substitute(some(other( |