Patch 8.2.1816
Problem:    Vim9: another memory leak when using function reference.
Solution:   Temporarily disable the tests.
Files:      src/testdir/test_vim9_func.vim


*** ../vim-8.2.1815/src/testdir/test_vim9_func.vim      2020-10-07 
19:08:00.013793470 +0200
--- src/testdir/test_vim9_func.vim      2020-10-09 10:15:32.899514452 +0200
***************
*** 1330,1360 ****
    unlet g:UseVararg
  enddef
  
! def MakeGetAndAppendRefs()
!   var local = 'a'
! 
!   def Append(arg: string)
!     local ..= arg
!   enddef
!   g:Append = Append
! 
!   def Get(): string
!     return local
!   enddef
!   g:Get = Get
! enddef
! 
! def Test_closure_append_get()
!   MakeGetAndAppendRefs()
!   g:Get()->assert_equal('a')
!   g:Append('-b')
!   g:Get()->assert_equal('a-b')
!   g:Append('-c')
!   g:Get()->assert_equal('a-b-c')
! 
!   unlet g:Append
!   unlet g:Get
! enddef
  
  def Test_nested_closure()
    var local = 'text'
--- 1330,1361 ----
    unlet g:UseVararg
  enddef
  
! " TODO: reenable after fixing memory leak
! "def MakeGetAndAppendRefs()
! "  var local = 'a'
! "
! "  def Append(arg: string)
! "    local ..= arg
! "  enddef
! "  g:Append = Append
! "
! "  def Get(): string
! "    return local
! "  enddef
! "  g:Get = Get
! "enddef
! "
! "def Test_closure_append_get()
! "  MakeGetAndAppendRefs()
! "  g:Get()->assert_equal('a')
! "  g:Append('-b')
! "  g:Get()->assert_equal('a-b')
! "  g:Append('-c')
! "  g:Get()->assert_equal('a-b-c')
! "
! "  unlet g:Append
! "  unlet g:Get
! "enddef
  
  def Test_nested_closure()
    var local = 'text'
***************
*** 1388,1406 ****
    CheckScriptSuccess(lines)
  enddef
  
! def Test_nested_closure_used()
!   var lines =<< trim END
!       vim9script
!       def Func()
!         var x = 'hello'
!         var Closure = {-> x}
!         g:Myclosure = {-> Closure()}
!       enddef
!       Func()
!       assert_equal('hello', g:Myclosure())
!   END
!   CheckScriptSuccess(lines)
! enddef
  
  def Test_nested_closure_fails()
    var lines =<< trim END
--- 1389,1408 ----
    CheckScriptSuccess(lines)
  enddef
  
! " TODO: reenable after fixing memory leak
! "def Test_nested_closure_used()
! "  var lines =<< trim END
! "      vim9script
! "      def Func()
! "        var x = 'hello'
! "        var Closure = {-> x}
! "        g:Myclosure = {-> Closure()}
! "      enddef
! "      Func()
! "      assert_equal('hello', g:Myclosure())
! "  END
! "  CheckScriptSuccess(lines)
! "enddef
  
  def Test_nested_closure_fails()
    var lines =<< trim END
*** ../vim-8.2.1815/src/version.c       2020-10-08 23:21:17.935678280 +0200
--- src/version.c       2020-10-09 10:17:41.559292578 +0200
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     1816,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
51. You put a pillow case over your laptop so your lover doesn't see it while
    you are pretending to catch your breath.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202010090821.0998LRxs3412602%40masaka.moolenaar.net.

Raspunde prin e-mail lui