From afd8874a9e4562eac42a02de90e42e430c3a1db1 Mon Sep 17 00:00:00 2001 From: Brown Date: Thu, 30 Jul 2020 15:42:34 -0400 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20get=20stuck=20in=20recursive=20?= =?UTF-8?q?loop?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #3912 --- src/Psalm/Internal/Analyzer/MethodComparator.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Psalm/Internal/Analyzer/MethodComparator.php b/src/Psalm/Internal/Analyzer/MethodComparator.php index 783d8d513e7..63e376d4106 100644 --- a/src/Psalm/Internal/Analyzer/MethodComparator.php +++ b/src/Psalm/Internal/Analyzer/MethodComparator.php @@ -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; }