Skip to content

Commit d5c599c

Browse files
committed
Fix subclass acceptability when class alias is involved on "ours" side
1 parent 0228643 commit d5c599c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Type/ObjectType.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,12 +456,12 @@ private function checkSubclassAcceptability(string $thatClass): AcceptsResult
456456

457457
if ($thisReflection->isInterface() && $thatReflection->isInterface()) {
458458
return AcceptsResult::createFromBoolean(
459-
$thatReflection->implementsInterface($this->className),
459+
$thatReflection->implementsInterface($thisReflection->getName()),
460460
);
461461
}
462462

463463
return AcceptsResult::createFromBoolean(
464-
$thatReflection->isSubclassOf($this->className),
464+
$thatReflection->isSubclassOf($thisReflection->getName()),
465465
);
466466
}
467467

0 commit comments

Comments
 (0)