if has('float')
assert_equal('func([unknown], [unknown]): float', typename(function('pow')))
endif
+ assert_equal('func', test_null_partial()->typename())
+ assert_equal('list<unknown>', test_null_list()->typename())
+ assert_equal('dict<unknown>', test_null_dict()->typename())
+ if has('job')
+ assert_equal('job', test_null_job()->typename())
+ endif
+ if has('channel')
+ assert_equal('channel', test_null_channel()->typename())
+ endif
enddef
def Test_undofile()
char_u *name = NULL;
ufunc_T *ufunc = NULL;
- if (tv->v_type == VAR_PARTIAL)
+ if (tv->v_type == VAR_PARTIAL && tv->vval.v_partial != NULL)
{
if (tv->vval.v_partial->pt_func != NULL)
ufunc = tv->vval.v_partial->pt_func;
type->tt_type = tv->v_type;
type->tt_argcount = argcount;
type->tt_min_argcount = min_argcount;
- if (tv->v_type == VAR_PARTIAL && tv->vval.v_partial->pt_argc > 0)
+ if (tv->v_type == VAR_PARTIAL && tv->vval.v_partial != NULL
+ && tv->vval.v_partial->pt_argc > 0)
{
type->tt_argcount -= tv->vval.v_partial->pt_argc;
type->tt_min_argcount -= tv->vval.v_partial->pt_argc;