You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use UnionType guard instead of getFiniteTypes() in Pass 2 condition matching
Replace the getFiniteTypes() guard with an instanceof UnionType check in
Pass 2 of filterBySpecifiedTypes(). This broadens Pass 2 to handle all
union condition types (not just finite ones), which fixes cases where
scope merging creates union conditions like int|string that should match
a narrowed type like int via isSuperTypeOf.
The UnionType guard still prevents regressions from non-union condition
types (non-falsy-string from TypeSpecifier, mixed~false from assignment
handlers) that are too broad for isSuperTypeOf matching.
Added test case for scope merging with is_string()||is_int() narrowing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0 commit comments