0
0
mirror of https://github.com/vim/vim.git synced 2025-10-04 05:25:06 -04:00

patch 8.2.2544: Vim9: error for argument when checking for lambda

Problem:    Vim9: error for argument when checking for lambda.
Solution:   Respect the skip flag. (closes #7887)
This commit is contained in:
Bram Moolenaar
2021-02-23 12:05:46 +01:00
parent 9cb577a682
commit bc327ccc3d
3 changed files with 12 additions and 1 deletions

View File

@@ -1922,6 +1922,14 @@ def Test_expr7_lambda()
CheckDefSuccess(['var Fx = (a) => [0,', ' 1]'])
CheckDefFailure(['var Fx = (a) => [0', ' 1]'], 'E696:', 2)
# no error for existing script variable when checking for lambda
lines =<< trim END
vim9script
var name = 0
eval (name + 2) / 3
END
CheckScriptSuccess(lines)
enddef
def NewLambdaWithComments(): func