comparison src/testdir/test_method.vim @ 18225:6c3a8312486d v8.1.2107

patch 8.1.2107: various memory leaks reported by asan Commit: https://github.com/vim/vim/commit/8617348e2110c2c8387ea448a6258f1effa8d249 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Oct 1 17:02:16 2019 +0200 patch 8.1.2107: various memory leaks reported by asan Problem: Various memory leaks reported by asan. Solution: Free the memory. (Ozaki Kiichi, closes https://github.com/vim/vim/issues/5003)
author Bram Moolenaar <Bram@vim.org>
date Tue, 01 Oct 2019 17:15:04 +0200
parents f71ee7b04f0b
children 9f98957582d6
comparison
equal deleted inserted replaced
18224:96632a3c3d90 18225:6c3a8312486d
138 138
139 call assert_fails('eval "text"->{x -> x .. " extended"} ()', 'E274:') 139 call assert_fails('eval "text"->{x -> x .. " extended"} ()', 'E274:')
140 140
141 " todo: lambda accepts more arguments than it consumes 141 " todo: lambda accepts more arguments than it consumes
142 " call assert_fails('eval "text"->{x -> x .. " extended"}("more")', 'E99:') 142 " call assert_fails('eval "text"->{x -> x .. " extended"}("more")', 'E99:')
143
144 let l = [1, 2, 3]
145 eval l->{x -> x}()
146 call assert_equal(1, test_refcount(l))
143 endfunc 147 endfunc
144 148
145 func Test_method_not_supported() 149 func Test_method_not_supported()
146 call assert_fails('eval 123->changenr()', 'E276:') 150 call assert_fails('eval 123->changenr()', 'E276:')
147 endfunc 151 endfunc