mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 9.0.1625: "super" is not considered a reserved name
Problem: "super" is not considered a reserved name. Solution: Add "super" to the list of reserved names. (closes #12515)
This commit is contained in:
@@ -86,12 +86,23 @@ one_function_arg(
|
||||
return arg;
|
||||
}
|
||||
|
||||
// Vim9 script: cannot use script var name for argument. In function: also
|
||||
// check local vars and arguments.
|
||||
if (!skip && argtypes != NULL && check_defined(arg, p - arg,
|
||||
evalarg == NULL ? NULL : evalarg->eval_cctx,
|
||||
// Extra checks in Vim9 script.
|
||||
if (!skip && argtypes != NULL)
|
||||
{
|
||||
int c = *p;
|
||||
*p = NUL;
|
||||
int r = check_reserved_name(arg, FALSE);
|
||||
*p = c;
|
||||
if (r == FAIL)
|
||||
return arg;
|
||||
|
||||
// Cannot use script var name for argument. In function: also check
|
||||
// local vars and arguments.
|
||||
if (check_defined(arg, p - arg,
|
||||
evalarg == NULL ? NULL : evalarg->eval_cctx,
|
||||
eap == NULL ? NULL : eap->cstack, TRUE) == FAIL)
|
||||
return arg;
|
||||
return arg;
|
||||
}
|
||||
|
||||
if (newargs != NULL && ga_grow(newargs, 1) == FAIL)
|
||||
return arg;
|
||||
|
Reference in New Issue
Block a user