forked from aniani/vim
patch 8.2.3305: Vim9: :finally in skipped block not handled correctly
Problem: Vim9: :finally in skipped block not handled correctly. Solution: Check whether :finally is in a skipped block. (Naruhiko Nishino, closes #8724)
This commit is contained in:
@@ -641,6 +641,20 @@ def Test_try_catch_throw()
|
||||
endtry
|
||||
END
|
||||
CheckScriptFailure(lines, 'E1032:')
|
||||
|
||||
# skipping try-finally-endtry when try-finally-endtry is used in another block
|
||||
lines =<< trim END
|
||||
if v:true
|
||||
try
|
||||
finally
|
||||
endtry
|
||||
else
|
||||
try
|
||||
finally
|
||||
endtry
|
||||
endif
|
||||
END
|
||||
CheckDefAndScriptSuccess(lines)
|
||||
enddef
|
||||
|
||||
def Test_try_in_catch()
|
||||
|
Reference in New Issue
Block a user