mirror of
https://github.com/vim/vim.git
synced 2025-10-05 05:34:07 -04:00
patch 8.2.2257: Vim9: using -> for lambda is ambiguous
Problem: Vim9: using -> for lambda is ambiguous. Solution: Stop supporting ->, must use =>.
This commit is contained in:
@@ -305,7 +305,7 @@ enddef
|
||||
def Test_skipped_expr_linebreak()
|
||||
if 0
|
||||
var x = []
|
||||
->map({ -> 0})
|
||||
->map(() => 0)
|
||||
endif
|
||||
enddef
|
||||
|
||||
@@ -368,7 +368,7 @@ enddef
|
||||
|
||||
def Test_filter_is_not_modifier()
|
||||
var tags = [{a: 1, b: 2}, {x: 3, y: 4}]
|
||||
filter(tags, { _, v -> has_key(v, 'x') ? 1 : 0 })
|
||||
filter(tags, ( _, v) => has_key(v, 'x') ? 1 : 0 )
|
||||
assert_equal([{x: 3, y: 4}], tags)
|
||||
enddef
|
||||
|
||||
|
Reference in New Issue
Block a user