mirror of
https://github.com/vim/vim.git
synced 2025-09-28 04:24:06 -04:00
patch 8.2.1723: Vim9: Variable argument name cannot start with underscore
Problem: Vim9: Variable argument name cannot start with underscore. Solution: Use eval_isnamec1(). (closes #6988)
This commit is contained in:
@@ -372,6 +372,15 @@ def Test_call_def_varargs()
|
|||||||
END
|
END
|
||||||
CheckScriptSuccess(lines)
|
CheckScriptSuccess(lines)
|
||||||
|
|
||||||
|
lines =<< trim END
|
||||||
|
vim9script
|
||||||
|
def Func(..._l: list<string>)
|
||||||
|
echo _l
|
||||||
|
enddef
|
||||||
|
Func('a', 'b', 'c')
|
||||||
|
END
|
||||||
|
CheckScriptSuccess(lines)
|
||||||
|
|
||||||
lines =<< trim END
|
lines =<< trim END
|
||||||
vim9script
|
vim9script
|
||||||
def Func(...l: list<string>)
|
def Func(...l: list<string>)
|
||||||
|
@@ -211,7 +211,7 @@ get_function_args(
|
|||||||
if (argtypes != NULL)
|
if (argtypes != NULL)
|
||||||
{
|
{
|
||||||
// ...name: list<type>
|
// ...name: list<type>
|
||||||
if (!ASCII_ISALPHA(*p))
|
if (!eval_isnamec1(*p))
|
||||||
{
|
{
|
||||||
emsg(_(e_missing_name_after_dots));
|
emsg(_(e_missing_name_after_dots));
|
||||||
break;
|
break;
|
||||||
|
@@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1723,
|
||||||
/**/
|
/**/
|
||||||
1722,
|
1722,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user