1
0
forked from aniani/vim

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 #7412)
This commit is contained in:
Bram Moolenaar
2020-12-02 20:51:22 +01:00
parent e0de171ecd
commit af0df47a76
3 changed files with 22 additions and 4 deletions

View File

@@ -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