Mercurial > vim
diff src/testdir/test_vim9_func.vim @ 23074:cd885eb0e50c v8.2.2083
patch 8.2.2083: Vim9: crash when using ":silent!" and getting member fails
Commit: https://github.com/vim/vim/commit/af0df47a7671a39f2cde950587ba48800188bfb9
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Dec 2 20:51:22 2020 +0100
patch 8.2.2083: Vim9: crash when using ":silent!" and getting member fails
Problem: Vim9: crash when using ":silent!" and getting member fails.
Solution: Jump to on_fatal_error. (closes https://github.com/vim/vim/issues/7412)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 02 Dec 2020 21:00:04 +0100 |
parents | 4b398a229b0b |
children | c713358da074 |
line wrap: on
line diff
--- a/src/testdir/test_vim9_func.vim +++ b/src/testdir/test_vim9_func.vim @@ -1768,5 +1768,19 @@ def Test_reset_did_emsg() CheckScriptFailure(lines, 'E492:', 8) enddef +def Test_abort_even_with_silent() + var lines =<< trim END + vim9script + g:result = 'none' + def Func() + eval {-> ''}() .. '' .. {}['X'] + g:result = 'yes' + enddef + sil! Func() + assert_equal('none', g:result) + END + CheckScriptSuccess(lines) +enddef + " vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker