1
0
forked from aniani/vim

patch 8.2.2743: Vim9: function state stuck when compiling with ":silent!"

Problem:    Vim9: function state stuck when compiling with ":silent!".
Solution:   Check for uf_def_status to be UF_COMPILING.
This commit is contained in:
Bram Moolenaar
2021-04-10 14:03:43 +02:00
parent 701cc6ca9e
commit 599410cb3c
5 changed files with 27 additions and 1 deletions

View File

@@ -2603,6 +2603,20 @@ def Test_compile_error()
# Second call won't try compiling again
assert_fails('call g:Broken()', 'E1091: Function is not compiled: Broken')
delfunc g:Broken
# No error when compiling with :silent!
lines =<< trim END
def g:Broken()
echo 'a' + []
enddef
silent! defcompile
END
CheckScriptSuccess(lines)
# Calling the function won't try compiling again
assert_fails('call g:Broken()', 'E1091: Function is not compiled: Broken')
delfunc g:Broken
enddef