diff options
| author | Bram Moolenaar <Bram@vim.org> | 2021-03-06 21:01:09 +0100 |
|---|---|---|
| committer | Bram Moolenaar <Bram@vim.org> | 2021-03-06 21:01:09 +0100 |
| commit | 6914e87d3c0387fdcbb117a39e1f6d1fac0ee2e3 (patch) | |
| tree | 70c8eac58264c58d4fa50f3d8aa740619e84b73b /src/testdir/test_vim9_cmd.vim | |
| parent | 04947cc6ed313b6b99889c27d008c68a373df634 (diff) | |
| download | vim-git-8.2.2575.tar.gz | |
patch 8.2.2575: Vim9: a function name with "->" in the next line doesn't workv8.2.2575
Problem: Vim9: a function name with "->" in the next line doesn't work.
Solution: Recognize a function name by itself. (closes #7770)
Diffstat (limited to 'src/testdir/test_vim9_cmd.vim')
| -rw-r--r-- | src/testdir/test_vim9_cmd.vim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_cmd.vim b/src/testdir/test_vim9_cmd.vim index f638c84b0..dd6e966de 100644 --- a/src/testdir/test_vim9_cmd.vim +++ b/src/testdir/test_vim9_cmd.vim @@ -357,6 +357,25 @@ def Test_method_call_linebreak() lines =<< trim END new + def Foo(): string + return 'the text' + enddef + def Bar(F: func): string + return F() + enddef + def Test() + Foo + ->Bar() + ->setline(1) + enddef + Test() + assert_equal('the text', getline(1)) + bwipe! + END + CheckDefAndScriptSuccess(lines) + + lines =<< trim END + new g:shortlist ->copy() ->setline(1) |
