From 06390975a1b8fc85379812fd61ed7fedeacfb4f7 Mon Sep 17 00:00:00 2001 From: Matthew Brown Date: Mon, 22 Jul 2019 23:54:33 -0400 Subject: [PATCH] Fix infinite recursion on property types --- src/Psalm/Internal/Codebase/Scanner.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Psalm/Internal/Codebase/Scanner.php b/src/Psalm/Internal/Codebase/Scanner.php index 7c3fd979d47..82b9a19234e 100644 --- a/src/Psalm/Internal/Codebase/Scanner.php +++ b/src/Psalm/Internal/Codebase/Scanner.php @@ -320,10 +320,12 @@ public function queueClassLikeForScanning( $public_mapped_properties = PropertyMap::getPropertyMap()[$fq_classlike_name_lc]; foreach ($public_mapped_properties as $public_mapped_property) { - if (strtolower($public_mapped_property) !== $fq_classlike_name_lc) { - $property_type = \Psalm\Type::parseString($public_mapped_property); - $property_type->queueClassLikesForScanning($this->codebase); - } + $property_type = \Psalm\Type::parseString($public_mapped_property); + $property_type->queueClassLikesForScanning( + $this->codebase, + null, + [$fq_classlike_name_lc => true] + ); } } }