0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 8.2.2212: Vim9: lambda with => does not work at the script level

Problem:    Vim9: lambda with => does not work at the script level.
Solution:   Make it work.
This commit is contained in:
Bram Moolenaar
2020-12-25 15:24:23 +01:00
parent b2f9e0e2c5
commit c754b4cc98
6 changed files with 56 additions and 16 deletions

View File

@@ -1027,11 +1027,11 @@ def Test_assign_lambda()
# check if assign a lambda to a variable which type is func or any.
var lines =<< trim END
vim9script
var FuncRef = {->123}
var FuncRef = {-> 123}
assert_equal(123, FuncRef())
var FuncRef_Func: func = {->123}
var FuncRef_Func: func = {-> 123}
assert_equal(123, FuncRef_Func())
var FuncRef_Any: any = {->123}
var FuncRef_Any: any = {-> 123}
assert_equal(123, FuncRef_Any())
END
CheckScriptSuccess(lines)