diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-08-04 23:04:39 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-08-04 23:04:39 +0200 |
commit | fcfe1a9b8950b8b211ab3b24d84b17c6847ea43f (patch) | |
tree | daeeffb4dd96cdd7744597d9623d222404edd8e2 /src/testdir/sautest/autoload | |
parent | 7a4ea1df2f85e00286c49db1145e3a38b35557f4 (diff) |
patch 8.1.1816: cannot use a user defined function as a methodv8.1.1816
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)
Diffstat (limited to 'src/testdir/sautest/autoload')
-rw-r--r-- | src/testdir/sautest/autoload/foo.vim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/testdir/sautest/autoload/foo.vim b/src/testdir/sautest/autoload/foo.vim index d7dcd5ce3d..298e7275d8 100644 --- a/src/testdir/sautest/autoload/foo.vim +++ b/src/testdir/sautest/autoload/foo.vim @@ -5,3 +5,7 @@ let foo#bar = {} func foo#bar.echo() let g:called_foo_bar_echo += 1 endfunc + +func foo#addFoo(head) + return a:head .. 'foo' +endfunc |