Skip to content

Commit

Permalink
Don’t get stuck in recursive loop
Browse files Browse the repository at this point in the history
Fixes #3912
  • Loading branch information
muglug committed Jul 30, 2020
1 parent 6919e88 commit afd8874
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Psalm/Internal/Analyzer/MethodComparator.php
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,10 @@ private static function transformTemplates(
$new_bases = [];

foreach ($mapped_type->getTemplateTypes() as $mapped_atomic_type) {
if ($mapped_atomic_type->defining_class === $base_class_name) {
continue;
}

$new_bases[] = $mapped_atomic_type->defining_class;
}

Expand Down

0 comments on commit afd8874

Please sign in to comment.