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

Fix storage not available in thread for intersection doc types

This commit is contained in:
Simon Berger 2024-03-24 22:07:33 +01:00 committed by Simon Berger
parent 85ff673099
commit 7128f0d7d3

View File

@ -1685,7 +1685,9 @@ final class TypeParser
$normalized_intersection_types = [];
$modified = false;
foreach ($intersection_types as $intersection_type) {
if (!$intersection_type instanceof TTypeAlias) {
if (!$intersection_type instanceof TTypeAlias
|| !$codebase->classlike_storage_provider->has($intersection_type->declaring_fq_classlike_name)
) {
$normalized_intersection_types[] = [$intersection_type];
continue;
}