Skip to content

Commit

Permalink
Fix infinite recursion on property types
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug authored and 2e3s committed Sep 29, 2019
1 parent 7bb9919 commit 0639097
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Psalm/Internal/Codebase/Scanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]
);
}
}
}
Expand Down

0 comments on commit 0639097

Please sign in to comment.