mirror of
https://github.com/vim/vim.git
synced 2025-10-18 07:54:29 -04:00
patch 8.0.1423: error in return not caught by try/catch
Problem: Error in return not caught by try/catch. Solution: Call update_force_abort(). (Yasuhiro Matsomoto, closes #2483)
This commit is contained in:
13
src/testdir/test_eval_stuff.vim
Normal file
13
src/testdir/test_eval_stuff.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Tests for various eval things.
|
||||
|
||||
function s:foo() abort
|
||||
try
|
||||
return [] == 0
|
||||
catch
|
||||
return 1
|
||||
endtry
|
||||
endfunction
|
||||
|
||||
func Test_catch_return_with_error()
|
||||
call assert_equal(1, s:foo())
|
||||
endfunc
|
Reference in New Issue
Block a user