comparison src/userfunc.c @ 23879:9ddf1a537fc2

patch 8.2.2481: Vim9: confusing error when variable arguments have default Commit: https://github.com/vim/vim/commit/4f53b79bf5f8b0de7c6933fd157894ba7a53f35e Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 7 15:59:49 2021 +0100 patch 8.2.2481: Vim9: confusing error when variable arguments have default Problem: Vim9: confusing error when variable arguments have a default value. Solution: Give a specific error message. (closes #7793)
author Bram Moolenaar <Bram@vim.org>
date Sun, 07 Feb 2021 16:00:04 +0100
parents 85cf06ddb2a8
children d95403445b6b
comparison
equal deleted inserted replaced
23878:27d60e2c71b8 23879:9ddf1a537fc2
239 arg = p; 239 arg = p;
240 p = one_function_arg(p, newargs, argtypes, types_optional, 240 p = one_function_arg(p, newargs, argtypes, types_optional,
241 skip); 241 skip);
242 if (p == arg) 242 if (p == arg)
243 break; 243 break;
244 if (*skipwhite(p) == '=')
245 {
246 emsg(_(e_cannot_use_default_for_variable_arguments));
247 break;
248 }
244 } 249 }
245 } 250 }
246 else 251 else
247 { 252 {
248 arg = p; 253 arg = p;