1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-02 09:37:59 +01:00
This commit is contained in:
Daniil Gentili 2022-12-01 19:19:37 +01:00
parent 2b0e979ee9
commit d24a243d80
2 changed files with 3 additions and 1 deletions

View File

@ -491,6 +491,8 @@ class ArgumentAnalyzer
&& isset($unpacked_atomic_array->properties[$unpacked_argument_offset])
) {
$arg_value_type = $unpacked_atomic_array->properties[$unpacked_argument_offset];
} elseif ($unpacked_atomic_array->fallback_params) {
$arg_value_type = $unpacked_atomic_array->getGenericValueType();
} elseif ($function_param->is_optional && $function_param->default_type) {
if ($function_param->default_type instanceof Union) {
$arg_value_type = $function_param->default_type;

View File

@ -4564,7 +4564,7 @@ class ClassTemplateTest extends TestCase
$m = new Map(fn(int $num) => (string) $num);
$m(["a"]);',
'error_message' => 'InvalidScalarArgument',
'error_message' => 'InvalidArgument',
'ignored_issues' => [],
'php_version' => '8.0'
],