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:
@@ -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()
|
||||
|
Reference in New Issue
Block a user