mirror of
https://github.com/vim/vim.git
synced 2025-10-02 05:04:20 -04:00
patch 8.2.2539: Vim9: return from finally block causes a hang
Problem: Vim9: return from finally block causes a hang. Solution: Store both the finally and endtry indexes. (closes #7885)
This commit is contained in:
@@ -577,6 +577,16 @@ def Test_try_catch_throw()
|
||||
counter += 1
|
||||
endfor
|
||||
assert_equal(4, counter)
|
||||
|
||||
# return in finally after empty catch
|
||||
def ReturnInFinally(): number
|
||||
try
|
||||
finally
|
||||
return 4
|
||||
endtry
|
||||
return 2
|
||||
enddef
|
||||
assert_equal(4, ReturnInFinally())
|
||||
enddef
|
||||
|
||||
def Test_cnext_works_in_catch()
|
||||
|
Reference in New Issue
Block a user