File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed
Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -3226,13 +3226,8 @@ public function filterBySpecifiedTypes(SpecifiedTypes $specifiedTypes): self
32263226 if ($ specifiedHolder ->equals ($ conditionalTypeHolder )) {
32273227 continue ;
32283228 }
3229+
32293230 $ guardType = $ conditionalTypeHolder ->getType ();
3230- // Allow subtype matching: when the specified type is a strict subtype
3231- // of the guard, fire the conditional. Restricted to UnionType and
3232- // IntegerRangeType guards — these represent explicit sets or ranges
3233- // of values where narrowing to a member validly satisfies the guard.
3234- // IntersectionType, MixedType, and other types can have coincidental
3235- // subtype relationships that cause incorrect type narrowing.
32363231 if (
32373232 $ conditionalExpression ->getTypeHolder ()->getCertainty ()->yes ()
32383233 && $ specifiedHolder ->getCertainty ()->yes ()
You can’t perform that action at this time.
0 commit comments