0
0
mirror of https://github.com/vim/vim.git synced 2025-10-03 05:14:07 -04:00

patch 8.2.2053: Vim9: lamba doesn't accept argument types

Problem:    Vim9: lamba doesn't accept argument types.
Solution:   Optionally accept argument types at the script level.
This commit is contained in:
Bram Moolenaar
2020-11-25 21:30:11 +01:00
parent 47a2abf0bc
commit c2ca935d26
3 changed files with 6 additions and 1 deletions

View File

@@ -1828,6 +1828,9 @@ def Test_expr7_lambda()
assert_equal(false, LambdaUsingArg(0)())
assert_equal(true, LambdaUsingArg(1)())
var res = map([1, 2, 3], {i: number, v: number -> i + v})
assert_equal([1, 3, 5], res)
END
CheckDefAndScriptSuccess(lines)