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

patch 8.2.1155: Vim9: cannot handle line break inside lambda

Problem:    Vim9: cannot handle line break inside lambda.
Solution:   Pass the compilation context through. (closes #6407, closes #6409)
This commit is contained in:
Bram Moolenaar
2020-07-08 17:36:21 +02:00
parent c620c055ce
commit 7a4b8980ea
6 changed files with 114 additions and 62 deletions

View File

@@ -965,6 +965,18 @@ def Test_line_continuation_in_def()
assert_equal('full', Line_continuation_in_def('.'))
enddef
def Line_continuation_in_lambda(): list<number>
let x = range(97, 100)
->map({_,v -> nr2char(v)
->toupper()})
->reverse()
return x
enddef
def Test_line_continuation_in_lambda()
assert_equal(['D', 'C', 'B', 'A'], Line_continuation_in_lambda())
enddef
func Test_silent_echo()
CheckScreendump