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.
diff --git a/src/testdir/test_expr.vim b/src/testdir/test_expr.vim
index ccca792..9f43732 100644
--- a/src/testdir/test_expr.vim
+++ b/src/testdir/test_expr.vim
@@ -403,7 +403,7 @@
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 @@
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