forked from aniani/vim
patch 8.2.3100: Vim9: no error when using type with unknown number of args
Problem: Vim9: no error when using type with unknown number of arguments. Solution: Do not ignore argument count of -1. (closes #8492)
This commit is contained in:
@@ -2054,6 +2054,18 @@ internal_func_check_arg_types(
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the argument count for function "idx".
|
||||
* "argcount" is the total argument count, "min_argcount" the non-optional
|
||||
* argument count.
|
||||
*/
|
||||
void
|
||||
internal_func_get_argcount(int idx, int *argcount, int *min_argcount)
|
||||
{
|
||||
*argcount = global_functions[idx].f_max_argc;
|
||||
*min_argcount = global_functions[idx].f_min_argc;
|
||||
}
|
||||
|
||||
/*
|
||||
* Call the "f_retfunc" function to obtain the return type of function "idx".
|
||||
* "argtypes" is the list of argument types or NULL when there are no
|
||||
|
||||
Reference in New Issue
Block a user