Skip to content

Commit 0751a9e

Browse files
committed
Do not throw away other reasons
1 parent c693a03 commit 0751a9e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Type/IntersectionType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ public function acceptsWithReason(Type $otherType, bool $strictTypes): AcceptsRe
191191

192192
if (!$result->yes()) {
193193
$isList = $otherType->isList();
194-
$reasons = [];
194+
$reasons = $result->reasons;
195195
$verbosity = VerbosityLevel::getRecommendedLevelByType($this, $otherType);
196196
if ($this->isList()->yes() && !$isList->yes()) {
197197
$reasons[] = sprintf(

0 commit comments

Comments
 (0)