0
0
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:
Bram Moolenaar
2020-12-31 21:28:47 +01:00
parent adc8e44645
commit 2949cfdbe4
10 changed files with 137 additions and 173 deletions

View File

@@ -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