Skip to content

Commit

Permalink
Do not throw away other reasons
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Nov 14, 2023
1 parent c693a03 commit 0751a9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Type/IntersectionType.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public function acceptsWithReason(Type $otherType, bool $strictTypes): AcceptsRe

if (!$result->yes()) {
$isList = $otherType->isList();
$reasons = [];
$reasons = $result->reasons;
$verbosity = VerbosityLevel::getRecommendedLevelByType($this, $otherType);
if ($this->isList()->yes() && !$isList->yes()) {
$reasons[] = sprintf(
Expand Down

0 comments on commit 0751a9e

Please sign in to comment.