Mercurial > vim
diff src/testdir/test_vim9_func.vim @ 27022:eebbcc83fb75 v8.2.4040
patch 8.2.4040: keeping track of allocated lines is too complicated
Commit: https://github.com/vim/vim/commit/9f1a39a5d1cd7989ada2d1cb32f97d84360e050f
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 8 15:39:39 2022 +0000
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 08 Jan 2022 16:45:02 +0100 |
parents | fceb494e22de |
children | 47dbeda35910 |
line wrap: on
line diff
--- a/src/testdir/test_vim9_func.vim +++ b/src/testdir/test_vim9_func.vim @@ -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