mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.3948: Vim9: failure with partial with unknown argument count
Problem: Vim9: failure with partial with unknown argument count. Solution: Do not copy argument types if there aren't any.
This commit is contained in:
@@ -749,6 +749,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 */
|
||||||
|
/**/
|
||||||
|
3948,
|
||||||
/**/
|
/**/
|
||||||
3947,
|
3947,
|
||||||
/**/
|
/**/
|
||||||
|
@@ -369,19 +369,22 @@ typval2type_int(typval_T *tv, int copyID, garray_T *type_gap, int do_member)
|
|||||||
if (type == NULL)
|
if (type == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
*type = *ufunc->uf_func_type;
|
*type = *ufunc->uf_func_type;
|
||||||
type->tt_argcount -= tv->vval.v_partial->pt_argc;
|
if (type->tt_argcount >= 0)
|
||||||
type->tt_min_argcount -= tv->vval.v_partial->pt_argc;
|
|
||||||
if (type->tt_argcount == 0)
|
|
||||||
type->tt_args = NULL;
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
int i;
|
type->tt_argcount -= tv->vval.v_partial->pt_argc;
|
||||||
|
type->tt_min_argcount -= tv->vval.v_partial->pt_argc;
|
||||||
|
if (type->tt_argcount == 0)
|
||||||
|
type->tt_args = NULL;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
func_type_add_arg_types(type, type->tt_argcount,
|
func_type_add_arg_types(type, type->tt_argcount,
|
||||||
type_gap);
|
type_gap);
|
||||||
for (i = 0; i < type->tt_argcount; ++i)
|
for (i = 0; i < type->tt_argcount; ++i)
|
||||||
type->tt_args[i] = ufunc->uf_func_type->tt_args[
|
type->tt_args[i] = ufunc->uf_func_type->tt_args[
|
||||||
i + tv->vval.v_partial->pt_argc];
|
i + tv->vval.v_partial->pt_argc];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user