Mercurial > vim
diff src/testdir/test_expr.vim @ 17849:73ddc462979d v8.1.1921
patch 8.1.1921: more functions can be used as methods
Commit: https://github.com/vim/vim/commit/a4208966fb289a505ebdef62bbc37c214069bab4
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 24 20:50:19 2019 +0200
patch 8.1.1921: more functions can be used as methods
Problem: More functions can be used as methods.
Solution: Make various functions usable as a method.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 24 Aug 2019 21:00:05 +0200 |
parents | 77bcb5055fec |
children | 7a19c8d6bb9e |
line wrap: on
line diff
--- a/src/testdir/test_expr.vim +++ b/src/testdir/test_expr.vim @@ -403,7 +403,7 @@ function Test_printf_spec_s() call assert_equal(string(value), printf('%s', value)) " funcref - call assert_equal('printf', printf('%s', function('printf'))) + call assert_equal('printf', printf('%s', 'printf'->function())) " partial call assert_equal(string(function('printf', ['%s'])), printf('%s', function('printf', ['%s']))) @@ -490,7 +490,7 @@ func Test_funcref() endfunc call assert_equal(2, OneByName()) call assert_equal(1, OneByRef()) - let OneByRef = funcref('One') + let OneByRef = 'One'->funcref() call assert_equal(2, OneByRef()) call assert_fails('echo funcref("{")', 'E475:') endfunc