vim-patch:7.4.2137

Problem:    Using function() with a name will find another function when it is
            redefined.
Solution:   Add funcref().  Refer to lambda using a partial.  Fix several
            reference counting issues.

437bafe4c8
This commit is contained in:
Michael Ennen
2016-12-16 14:51:49 -07:00
parent 1f715ac1c1
commit 53fad45115
10 changed files with 384 additions and 227 deletions

View File

@@ -259,10 +259,10 @@ endfunction
func Test_closure_refcount()
let g:Count = LambdaFoo()
call test_garbagecollect_now()
call garbagecollect()
call assert_equal(1, g:Count())
let g:Count2 = LambdaFoo()
call test_garbagecollect_now()
call garbagecollect()
call assert_equal(1, g:Count2())
call assert_equal(2, g:Count())
call assert_equal(3, g:Count2())