Skip to content

Commit

Permalink
Prohibit objectlike to list
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Oct 9, 2019
1 parent e620c2c commit 2ae76bb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Psalm/Internal/Analyzer/TypeAnalyzer.php
Expand Up @@ -1876,9 +1876,12 @@ private static function isMatchingTypeContainedBy(

if ($container_type_part instanceof TList
&& $input_type_part instanceof ObjectLike
&& $input_type_part->is_list
) {
$input_type_part = $input_type_part->getList();
if ($input_type_part->is_list) {
$input_type_part = $input_type_part->getList();
} else {
return false;
}
}

if ($container_type_part instanceof TList
Expand Down

0 comments on commit 2ae76bb

Please sign in to comment.