1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 13:51:54 +01:00

Merge pull request #10156 from boesing/bugfix/prevent-infinite-loop-in-type-parser

This commit is contained in:
Bruce Weirdan 2023-08-28 12:06:45 +02:00 committed by GitHub
commit cc7ed9586e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1629,9 +1629,7 @@ class TypeParser
continue;
}
$modified = true;
$normalized_intersection_types[] = TypeExpander::expandAtomic(
$expanded_intersection_type = TypeExpander::expandAtomic(
$codebase,
$intersection_type,
null,
@ -1644,6 +1642,9 @@ class TypeParser
true,
true,
);
$modified = $modified || $expanded_intersection_type[0] !== $intersection_type;
$normalized_intersection_types[] = $expanded_intersection_type;
}
if ($modified === false) {