0
0
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:
Bram Moolenaar
2017-12-23 17:26:11 +01:00
parent 45a0000d5c
commit fabaf753e2
6 changed files with 24 additions and 2 deletions

View 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