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:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user