mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 17:36:29 +00:00
vim-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.
b4518563c7
This commit is contained in:
@@ -291,3 +291,9 @@ func Test_named_function_closure()
|
||||
call garbagecollect()
|
||||
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
|
||||
|
Reference in New Issue
Block a user