mirror of
https://github.com/vim/vim.git
synced 2025-10-01 04:54:07 -04:00
patch 8.2.2330: Vim9: crash when using :trow in a not executed block
Problem: Vim9: crash when using :trow in a not executed block. Solution: Don't generate the instruction when skipping. (closes #7659)
This commit is contained in:
@@ -324,7 +324,7 @@ func g:NoSuchFunc()
|
||||
echo 'none'
|
||||
endfunc
|
||||
|
||||
def Test_try_catch()
|
||||
def Test_try_catch_throw()
|
||||
var l = []
|
||||
try # comment
|
||||
add(l, '1')
|
||||
@@ -558,6 +558,12 @@ def Test_try_catch()
|
||||
assert_equal(411, n)
|
||||
enddef
|
||||
|
||||
def Test_throw_skipped()
|
||||
if 0
|
||||
throw dontgethere
|
||||
endif
|
||||
enddef
|
||||
|
||||
def DeletedFunc(): list<any>
|
||||
return ['delete me']
|
||||
enddef
|
||||
|
Reference in New Issue
Block a user