Patch 8.2.3948
Problem:    Vim9: failure with partial with unknown argument count.
Solution:   Do not copy argument types if there aren't any.
Files:      src/vim9type.c


*** ../vim-8.2.3947/src/vim9type.c      2021-12-30 13:28:56.812073798 +0000
--- src/vim9type.c      2021-12-30 13:57:22.486165863 +0000
***************
*** 369,387 ****
                    if (type == NULL)
                        return NULL;
                    *type = *ufunc->uf_func_type;
!                   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,
                                                                     type_gap);
!                       for (i = 0; i < type->tt_argcount; ++i)
!                           type->tt_args[i] = ufunc->uf_func_type->tt_args[
                                              i + tv->vval.v_partial->pt_argc];
                    }
                    return type;
                }
--- 369,390 ----
                    if (type == NULL)
                        return NULL;
                    *type = *ufunc->uf_func_type;
!                   if (type->tt_argcount >= 0)
                    {
!                       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,
                                                                     type_gap);
!                           for (i = 0; i < type->tt_argcount; ++i)
!                               type->tt_args[i] = ufunc->uf_func_type->tt_args[
                                              i + tv->vval.v_partial->pt_argc];
+                       }
                    }
                    return type;
                }
*** ../vim-8.2.3947/src/version.c       2021-12-30 13:45:53.678853155 +0000
--- src/version.c       2021-12-30 13:58:49.458067920 +0000
***************
*** 751,752 ****
--- 751,754 ----
  {   /* Add new patch number below this line */
+ /**/
+     3948,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
153. You find yourself staring at your "inbox" waiting for new e-mail
     to arrive.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20211230135959.8255A1C0A5B%40moolenaar.net.

Raspunde prin e-mail lui