Problem: Vim9: confusing error when variable arguments have a default
value.
Solution: Give a specific error message. (closes #7793)
Func(1, 'a')
END
CheckScriptFailure(lines, 'E1013: Argument 1: type mismatch')
+
+ lines =<< trim END
+ vim9script
+ def Func( # some comment
+ ...l = []
+ )
+ echo l
+ enddef
+ END
+ CheckScriptFailure(lines, 'E1160:')
enddef
let s:value = ''
skip);
if (p == arg)
break;
+ if (*skipwhite(p) == '=')
+ {
+ emsg(_(e_cannot_use_default_for_variable_arguments));
+ break;
+ }
}
}
else
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2481,
/**/
2480,
/**/