0
0
mirror of https://github.com/vim/vim.git synced 2025-10-05 05:34:07 -04:00

patch 8.2.2575: Vim9: a function name with "->" in the next line doesn't work

Problem:    Vim9: a function name with "->" in the next line doesn't work.
Solution:   Recognize a function name by itself. (closes #7770)
This commit is contained in:
Bram Moolenaar
2021-03-06 21:01:09 +01:00
parent 04947cc6ed
commit 6914e87d3c
3 changed files with 43 additions and 3 deletions

View File

@@ -355,6 +355,25 @@ def Test_method_call_linebreak()
END
CheckDefAndScriptSuccess(lines)
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