From fcfe1a9b8950b8b211ab3b24d84b17c6847ea43f Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 4 Aug 2019 23:04:39 +0200 Subject: patch 8.1.1816: cannot use a user defined function as a method Problem: Cannot use a user defined function as a method. Solution: Pass the base as the first argument to the user defined function after "->". (partly by FUJIWARA Takuya) --- src/testdir/test_autoload.vim | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/testdir/test_autoload.vim') diff --git a/src/testdir/test_autoload.vim b/src/testdir/test_autoload.vim index 7396c227c..b8c4fa251 100644 --- a/src/testdir/test_autoload.vim +++ b/src/testdir/test_autoload.vim @@ -8,6 +8,8 @@ func Test_autoload_dict_func() call g:foo#bar.echo() call assert_equal(1, g:loaded_foo_vim) call assert_equal(1, g:called_foo_bar_echo) + + eval 'bar'->g:foo#addFoo()->assert_equal('barfoo') endfunc func Test_source_autoload() -- cgit v1.2.1