diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-08-24 20:50:19 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-08-24 20:50:19 +0200 |
commit | a4208966fb289a505ebdef62bbc37c214069bab4 (patch) | |
tree | 97ec3983559c99f47bdb9213f96a95f403af35f0 /src/testdir/test_expr.vim | |
parent | f63962378dc32c7253e4825b4b0f414a81c1dd3e (diff) | |
download | vim-git-a4208966fb289a505ebdef62bbc37c214069bab4.tar.gz |
patch 8.1.1921: more functions can be used as methodsv8.1.1921
Problem: More functions can be used as methods.
Solution: Make various functions usable as a method.
Diffstat (limited to 'src/testdir/test_expr.vim')
-rw-r--r-- | src/testdir/test_expr.vim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/testdir/test_expr.vim b/src/testdir/test_expr.vim index ccca79270..9f4373278 100644 --- 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 |