mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Use $codebase->classlike_storage_provider only if it has the required data. Fixes #8373
This commit is contained in:
parent
57fcc3968e
commit
fefd4861d6
@ -1138,7 +1138,7 @@ class TemplateStandinTypeReplacer
|
||||
): array {
|
||||
if ($input_type_part instanceof TGenericObject || $input_type_part instanceof TIterable) {
|
||||
$input_type_params = $input_type_part->type_params;
|
||||
} else {
|
||||
} elseif ($codebase->classlike_storage_provider->has($input_type_part->value)) {
|
||||
$class_storage = $codebase->classlike_storage_provider->get($input_type_part->value);
|
||||
|
||||
$container_class = $container_type_part->value;
|
||||
@ -1150,6 +1150,8 @@ class TemplateStandinTypeReplacer
|
||||
} else {
|
||||
$input_type_params = array_fill(0, count($class_storage->template_types ?? []), Type::getMixed());
|
||||
}
|
||||
} else {
|
||||
$input_type_params = [];
|
||||
}
|
||||
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user