We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0945d6a commit ec4322eCopy full SHA for ec4322e
src/Analyser/MutatingScope.php
@@ -3237,7 +3237,7 @@ public function filterBySpecifiedTypes(SpecifiedTypes $specifiedTypes): self
3237
$conditionalExpression->getTypeHolder()->getCertainty()->yes()
3238
&& $specifiedHolder->getCertainty()->yes()
3239
&& $conditionalTypeHolder->getCertainty()->yes()
3240
- && ($guardType instanceof UnionType || $guardType instanceof IntegerRangeType)
+ && $guardType->isScalar()->yes()
3241
&& $guardType->isSuperTypeOf($specifiedHolder->getType())->yes()
3242
) {
3243
$subtypeMatch = true;
0 commit comments