diff options
-rw-r--r-- | src/eval.c | 2 | ||||
-rw-r--r-- | src/testdir/test_vim9_expr.vim | 3 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c index 6fea43605..f23d721df 100644 --- a/src/eval.c +++ b/src/eval.c @@ -3266,7 +3266,7 @@ eval7( * Lambda: {arg, arg -> expr} * Dictionary: {'key': val, 'key': val} */ - case '{': ret = get_lambda_tv(arg, rettv, FALSE, evalarg); + case '{': ret = get_lambda_tv(arg, rettv, in_vim9script(), evalarg); if (ret == NOTDONE) ret = eval_dict(arg, rettv, evalarg, FALSE); break; 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) diff --git a/src/version.c b/src/version.c index c653cdc84..bd8abac7a 100644 --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2053, +/**/ 2052, /**/ 2051, |