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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user