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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user