mirror of
https://github.com/danog/psalm.git
synced 2024-12-02 09:37:59 +01:00
Fix
This commit is contained in:
parent
2b0e979ee9
commit
d24a243d80
@ -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;
|
||||
|
@ -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'
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user