comparison src/testdir/test_vim9_cmd.vim @ 23428:5807e3958e38 v8.2.2257

patch 8.2.2257: Vim9: using -> for lambda is ambiguous Commit: https://github.com/vim/vim/commit/2949cfdbe4335b9abcfeda1be4dfc52090ee1df6 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Dec 31 21:28:47 2020 +0100 patch 8.2.2257: Vim9: using -> for lambda is ambiguous Problem: Vim9: using -> for lambda is ambiguous. Solution: Stop supporting ->, must use =>.
author Bram Moolenaar <Bram@vim.org>
date Thu, 31 Dec 2020 21:30:03 +0100
parents bb0c53f4ef8b
children 95db03521b01
comparison
equal deleted inserted replaced
23427:8f2dcc0cfcf6 23428:5807e3958e38
303 enddef 303 enddef
304 304
305 def Test_skipped_expr_linebreak() 305 def Test_skipped_expr_linebreak()
306 if 0 306 if 0
307 var x = [] 307 var x = []
308 ->map({ -> 0}) 308 ->map(() => 0)
309 endif 309 endif
310 enddef 310 enddef
311 311
312 def Test_dict_member() 312 def Test_dict_member()
313 var test: dict<list<number>> = {data: [3, 1, 2]} 313 var test: dict<list<number>> = {data: [3, 1, 2]}
366 endif 366 endif
367 enddef 367 enddef
368 368
369 def Test_filter_is_not_modifier() 369 def Test_filter_is_not_modifier()
370 var tags = [{a: 1, b: 2}, {x: 3, y: 4}] 370 var tags = [{a: 1, b: 2}, {x: 3, y: 4}]
371 filter(tags, { _, v -> has_key(v, 'x') ? 1 : 0 }) 371 filter(tags, ( _, v) => has_key(v, 'x') ? 1 : 0 )
372 assert_equal([{x: 3, y: 4}], tags) 372 assert_equal([{x: 3, y: 4}], tags)
373 enddef 373 enddef
374 374
375 def Test_command_modifier_filter() 375 def Test_command_modifier_filter()
376 var lines =<< trim END 376 var lines =<< trim END