summaryrefslogtreecommitdiff
path: root/src/testdir/test_vim9_expr.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-11-25 21:30:11 +0100
committerBram Moolenaar <Bram@vim.org>2020-11-25 21:30:11 +0100
commitc2ca935d26b3fc64a13d4e7d0583fc787efe61d0 (patch)
tree10d49b2710dc2b83574f44f7cee9d56c25a29f47 /src/testdir/test_vim9_expr.vim
parent47a2abf0bc3c3dac0433754ad0365ebad152df8c (diff)
downloadvim-git-c2ca935d26b3fc64a13d4e7d0583fc787efe61d0.tar.gz
patch 8.2.2053: Vim9: lamba doesn't accept argument typesv8.2.2053
Problem: Vim9: lamba doesn't accept argument types. Solution: Optionally accept argument types at the script level.
Diffstat (limited to 'src/testdir/test_vim9_expr.vim')
-rw-r--r--src/testdir/test_vim9_expr.vim3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_expr.vim b/src/testdir/test_vim9_expr.vim
index 02f8c0ad0..57307a27e 100644
--- a/src/testdir/test_vim9_expr.vim
+++ b/src/testdir/test_vim9_expr.vim
@@ -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)