Commit daf5d79
Apply symmetric fix for integer range generalization in gotGreater && gotSmaller case
Instead of immediately widening to IntegerType (plain int) when integer ranges
grow in both directions, compute the actual observed min/max bounds from both
iterations using IntegerRangeType::fromInterval(). This mirrors the fix already
applied for constant integers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 4d9968f commit daf5d79
File tree
2 files changed
+50
-1
lines changed- src/Analyser
- tests/PHPStan/Analyser/nsrt
2 files changed
+50
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4204 | 4204 | | |
4205 | 4205 | | |
4206 | 4206 | | |
4207 | | - | |
| 4207 | + | |
| 4208 | + | |
| 4209 | + | |
| 4210 | + | |
| 4211 | + | |
| 4212 | + | |
| 4213 | + | |
| 4214 | + | |
| 4215 | + | |
| 4216 | + | |
| 4217 | + | |
| 4218 | + | |
| 4219 | + | |
| 4220 | + | |
| 4221 | + | |
| 4222 | + | |
| 4223 | + | |
| 4224 | + | |
| 4225 | + | |
| 4226 | + | |
| 4227 | + | |
| 4228 | + | |
| 4229 | + | |
| 4230 | + | |
| 4231 | + | |
| 4232 | + | |
| 4233 | + | |
| 4234 | + | |
| 4235 | + | |
| 4236 | + | |
| 4237 | + | |
4208 | 4238 | | |
4209 | 4239 | | |
4210 | 4240 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
0 commit comments