diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-08-23 15:21:55 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-08-23 15:21:55 +0200 |
commit | 8436773fad285215481c4ce2b32692e66fca599f (patch) | |
tree | 06e0f314b50b1051d747101adeee5c269fe6585f /src/testdir/test_vim9_script.vim | |
parent | dc0cf1db3e8e0de349e4cc5b0a7ab6c8b7dc2ebb (diff) |
patch 8.2.1515: Vim9: can create s:var in legacy script but cannot unletv8.2.1515
Problem: Vim9: can create s:var in legacy script but cannot unlet.
Solution: Allow :unlet for legacy script var.
Diffstat (limited to 'src/testdir/test_vim9_script.vim')
-rw-r--r-- | src/testdir/test_vim9_script.vim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_script.vim b/src/testdir/test_vim9_script.vim index 5a251473cd..05b4e9f022 100644 --- a/src/testdir/test_vim9_script.vim +++ b/src/testdir/test_vim9_script.vim @@ -608,6 +608,13 @@ def Test_unlet() assert_false(exists('g:somevar')) unlet! g:somevar + # also works for script-local variable in legacy Vim script + s:somevar = 'legacy' + assert_true(exists('s:somevar')) + unlet s:somevar + assert_false(exists('s:somevar')) + unlet! s:somevar + call CheckScriptFailure([ 'vim9script', 'let svar = 123', |