mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.3107: Vim9: error for arguments while type didn't specify arguments
Problem: Vim9: error for arguments while type didn't specify arguments. Solution: Do not update that type to check when no argument count is specified. (closes #8492)
This commit is contained in:
parent
6977dba04b
commit
22f85d0459
@ -681,6 +681,16 @@ def Test_assignment_partial()
|
|||||||
assert_equal('done', Partial())
|
assert_equal('done', Partial())
|
||||||
END
|
END
|
||||||
CheckDefAndScriptSuccess(lines)
|
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
|
enddef
|
||||||
|
|
||||||
def Test_assignment_list_any_index()
|
def Test_assignment_list_any_index()
|
||||||
|
@ -3148,7 +3148,8 @@ call_func(
|
|||||||
argvars = argv;
|
argvars = argv;
|
||||||
argcount = partial->pt_argc + argcount_in;
|
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
|
// Now funcexe->check_type is missing the added arguments, make
|
||||||
// a copy of the type with the correction.
|
// a copy of the type with the correction.
|
||||||
|
@ -755,6 +755,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 */
|
||||||
|
/**/
|
||||||
|
3107,
|
||||||
/**/
|
/**/
|
||||||
3106,
|
3106,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user