summaryrefslogtreecommitdiff
path: root/src/testdir/test_lambda.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir/test_lambda.vim')
-rw-r--r--src/testdir/test_lambda.vim6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/testdir/test_lambda.vim b/src/testdir/test_lambda.vim
index 901d535e8..a95d591ce 100644
--- a/src/testdir/test_lambda.vim
+++ b/src/testdir/test_lambda.vim
@@ -284,3 +284,9 @@ func Test_named_function_closure()
call test_garbagecollect_now()
call assert_equal(14, s:Abar())
endfunc
+
+func Test_lambda_with_index()
+ let List = {x -> [x]}
+ let Extract = {-> function(List, ['foobar'])()[0]}
+ call assert_equal('foobar', Extract())
+endfunc