1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00

Only check functionlike arguments match if we know params

This commit is contained in:
Matt Brown 2018-04-09 18:49:11 -04:00
parent 47255fb19b
commit 7640b00635

View File

@ -270,11 +270,12 @@ class FunctionCallChecker extends \Psalm\Checker\Statements\Expression\CallCheck
}
// do this here to allow closure param checks
if (self::checkFunctionLikeArgumentsMatch(
if ($function_params !== null
&& self::checkFunctionLikeArgumentsMatch(
$statements_checker,
$stmt->args,
$function_id,
$function_params ?: [],
$function_params,
$function_storage,
null,
$generic_params,