mirror of
https://github.com/vim/vim.git
synced 2025-10-02 05:04:20 -04:00
patch 8.2.1182: Vim9: no check for whitespace after comma in lambda
Problem: Vim9: no check for whitespace after comma in lambda. Solution: Give error if white space is missing.
This commit is contained in:
@@ -1067,10 +1067,11 @@ def Test_expr7_list_vim9script()
|
||||
enddef
|
||||
|
||||
def Test_expr7_lambda()
|
||||
" lambda
|
||||
let La = { -> 'result'}
|
||||
assert_equal('result', La())
|
||||
assert_equal([1, 3, 5], [1, 2, 3]->map({key, val -> key + val}))
|
||||
|
||||
call CheckDefFailure(["filter([1, 2], {k,v -> 1})"], 'E1069:')
|
||||
enddef
|
||||
|
||||
def Test_expr7_lambda_vim9script()
|
||||
|
Reference in New Issue
Block a user