Skip to content

Commit 4f635e7

Browse files
committed
Fix test
1 parent 856a9f1 commit 4f635e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/PHPStan/Type/SimultaneousTypeTraverserTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ public function testChangeIntegerIntoString(Type $left, Type $right, string $exp
9292
public static function dataDescriptionBased(): iterable
9393
{
9494
$chooseScalarSubtype = static function (Type $left, Type $right, callable $traverse): Type {
95-
if (!$left->isScalar()->yes()) {
95+
if (!$left->isScalar()->yes() || $left instanceof BenevolentUnionType) {
9696
return $traverse($left, $right);
9797
}
98-
if (!$right->isScalar()->yes()) {
98+
if (!$right->isScalar()->yes() || $right instanceof BenevolentUnionType) {
9999
return $traverse($left, $right);
100100
}
101101
if (!$left->isSuperTypeOf($right)->yes()) {

0 commit comments

Comments
 (0)