patch 8.1.0019: error when defining a Lambda with index of a function result
Problem: Error when defining a Lambda with index of a function result.
Solution: When not evaluating an expression and skipping a function call,
set the return value to VAR_UNKNOWN.
diff --git a/src/testdir/test_lambda.vim b/src/testdir/test_lambda.vim
index 901d535..a95d591 100644
--- a/src/testdir/test_lambda.vim
+++ b/src/testdir/test_lambda.vim
@@ -284,3 +284,9 @@
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