1
0
forked from aniani/vim

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

@@ -82,7 +82,8 @@ one_function_arg(
}
// Vim9 script: cannot use script var name for argument.
if (argtypes != NULL && script_var_exists(arg, p - arg, FALSE, NULL) == OK)
if (!skip && argtypes != NULL && script_var_exists(arg, p - arg,
FALSE, NULL) == OK)
{
semsg(_(e_variable_already_declared_in_script), arg);
return arg;