1
0
forked from aniani/vim

patch 8.2.4040: keeping track of allocated lines is too complicated

Problem:    Keeping track of allocated lines in user functions is too
            complicated.
Solution:   Instead of freeing individual lines keep them all until the end.
This commit is contained in:
Bram Moolenaar
2022-01-08 15:39:39 +00:00
parent 67ffb41786
commit 9f1a39a5d1
10 changed files with 82 additions and 47 deletions

View File

@@ -1757,6 +1757,21 @@ def Test_nested_function_with_args_split()
CheckScriptFailure(lines, 'E1173: Text found after endfunction: BBBB')
enddef
def Test_error_in_function_args()
var lines =<< trim END
def FirstFunction()
def SecondFunction(J =
# Nois
# one
enddef|BBBB
enddef
# Compile all functions
defcompile
END
CheckScriptFailure(lines, 'E488:')
enddef
def Test_return_type_wrong()
CheckScriptFailure([
'def Func(): number',
@@ -2048,7 +2063,6 @@ func Test_free_dict_while_in_funcstack()
endfunc
def Run_Test_free_dict_while_in_funcstack()
# this was freeing the TermRun() default argument dictionary while it was
# still referenced in a funcstack_T
var lines =<< trim END