To: vim_dev@googlegroups.com Subject: Patch 8.2.3948 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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 -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///