Commit 2d5f0f6
Remove UnionType guard from Pass 2 condition matching
The UnionType guard was a workaround for two issues that are now fixed
at their root causes:
1. pr-5379 regression (non-falsy-string matching 'filter'): Fixed by
skipping trivially-always-true conditions in
processBooleanSureConditionalTypes — when TypeCombinator::remove has
no effect, the condition is not created.
2. bug-14249 regression (mixed~false producing *NEVER*): Fixed by
marking the getMixed() test helper as @phpstan-impure, preventing
conflicting conditional expressions from assignment handlers.
With these root causes addressed, Pass 2 can safely use isSuperTypeOf
for all condition types without restriction.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 24f8a2f commit 2d5f0f6
1 file changed
+7
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3229 | 3229 | | |
3230 | 3230 | | |
3231 | 3231 | | |
3232 | | - | |
3233 | | - | |
3234 | | - | |
3235 | | - | |
3236 | | - | |
3237 | | - | |
3238 | | - | |
3239 | | - | |
3240 | | - | |
3241 | | - | |
3242 | | - | |
3243 | | - | |
3244 | | - | |
3245 | | - | |
3246 | | - | |
3247 | | - | |
| 3232 | + | |
| 3233 | + | |
| 3234 | + | |
| 3235 | + | |
| 3236 | + | |
| 3237 | + | |
| 3238 | + | |
3248 | 3239 | | |
3249 | 3240 | | |
3250 | 3241 | | |
| |||
3255 | 3246 | | |
3256 | 3247 | | |
3257 | 3248 | | |
3258 | | - | |
3259 | | - | |
3260 | | - | |
3261 | 3249 | | |
3262 | 3250 | | |
3263 | 3251 | | |
| |||
0 commit comments