0
0
mirror of https://github.com/vim/vim.git synced 2025-10-01 04:54:07 -04:00

patch 8.2.2503: Vim9: a caught error may leave something on the stack

Problem:    Vim9: a caught error may leave something on the stack.
Solution:   Drop items from the stack if needed. (closes #7826)
This commit is contained in:
Bram Moolenaar
2021-02-12 21:32:47 +01:00
parent ca753ec862
commit d9d7789b6f
3 changed files with 21 additions and 1 deletions

View File

@@ -556,6 +556,16 @@ def Test_try_catch_throw()
n = 411
endtry
assert_equal(411, n)
var counter = 0
for i in range(4)
try
eval [][0]
catch
endtry
counter += 1
endfor
assert_equal(4, counter)
enddef
def Test_cnext_works_in_catch()