Problem: Vim9: error for wrong number of arguments is not useful.
Solution: Mention whatever we have for the name. (closes #7208)
CheckDefFailure(['bufnr(xxx)'], 'E1001:')
CheckScriptFailure(['def Func(Ref: func(s: string))'], 'E475:')
+ CheckDefFailure(['echo {i -> 0}()'], 'E119: Not enough arguments for function: {i -> 0}()')
+
var lines =<< trim END
vim9script
def Func(s: string)
set eventignore=
autocmd QuickFixCmdPost * copen
def AutocmdsDisabled()
- eval 0
+ eval 0
enddef
func Func()
noautocmd call s:AutocmdsDisabled()
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1915,
/**/
1914,
/**/
if (argcount < type->tt_min_argcount - varargs)
{
- semsg(_(e_toofewarg), "[reference]");
+ semsg(_(e_toofewarg), name);
return FAIL;
}
if (!varargs && argcount > type->tt_argcount)
{
- semsg(_(e_toomanyarg), "[reference]");
+ semsg(_(e_toomanyarg), name);
return FAIL;
}
}