comparison src/userfunc.c @ 24004:90fbe1a3b23c v8.2.2544

patch 8.2.2544: Vim9: error for argument when checking for lambda Commit: https://github.com/vim/vim/commit/bc327ccc3dd408463fc74266f57b879888a13e51 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Feb 23 12:05:46 2021 +0100 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 https://github.com/vim/vim/issues/7887)
author Bram Moolenaar <Bram@vim.org>
date Tue, 23 Feb 2021 12:15:03 +0100
parents c192411b27e8
children 308d29307910
comparison
equal deleted inserted replaced
24003:e6254ce853b7 24004:90fbe1a3b23c
80 semsg(_("E125: Illegal argument: %s"), arg); 80 semsg(_("E125: Illegal argument: %s"), arg);
81 return arg; 81 return arg;
82 } 82 }
83 83
84 // Vim9 script: cannot use script var name for argument. 84 // Vim9 script: cannot use script var name for argument.
85 if (argtypes != NULL && script_var_exists(arg, p - arg, FALSE, NULL) == OK) 85 if (!skip && argtypes != NULL && script_var_exists(arg, p - arg,
86 FALSE, NULL) == OK)
86 { 87 {
87 semsg(_(e_variable_already_declared_in_script), arg); 88 semsg(_(e_variable_already_declared_in_script), arg);
88 return arg; 89 return arg;
89 } 90 }
90 91