summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/testdir/test_vim9_assign.vim10
-rw-r--r--src/userfunc.c3
-rw-r--r--src/version.c2
3 files changed, 14 insertions, 1 deletions
diff --git a/src/testdir/test_vim9_assign.vim b/src/testdir/test_vim9_assign.vim
index a92a60bbd..6bbbc3681 100644
--- a/src/testdir/test_vim9_assign.vim
+++ b/src/testdir/test_vim9_assign.vim
@@ -681,6 +681,16 @@ def Test_assignment_partial()
assert_equal('done', Partial())
END
CheckDefAndScriptSuccess(lines)
+
+ lines =<< trim END
+ vim9script
+ def Func(b: bool)
+ enddef
+ var Ref: func = function(Func, [true])
+ assert_equal('func()', typename(Ref))
+ Ref()
+ END
+ CheckScriptSuccess(lines)
enddef
def Test_assignment_list_any_index()
diff --git a/src/userfunc.c b/src/userfunc.c
index 404f85bb5..4234681cd 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -3148,7 +3148,8 @@ call_func(
argvars = argv;
argcount = partial->pt_argc + argcount_in;
- if (funcexe->check_type != NULL)
+ if (funcexe->check_type != NULL
+ && funcexe->check_type->tt_argcount != -1)
{
// Now funcexe->check_type is missing the added arguments, make
// a copy of the type with the correction.
diff --git a/src/version.c b/src/version.c
index 10231abd8..060c2e770 100644
--- a/src/version.c
+++ b/src/version.c
@@ -756,6 +756,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 3107,
+/**/
3106,
/**/
3105,