Commit 3ee8006
Add INF test cases to bug-11054 regression test
Adds test coverage for INF (as opposed to NAN) in array constant
comparisons. Unlike NAN, INF === INF is true in PHP, so type narrowing
correctly eliminates the type after the first comparison.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent cf401ab commit 3ee8006
2 files changed
Lines changed: 23 additions & 1 deletion
File tree
- tests/PHPStan/Rules/Comparison
- data
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1163 | 1163 | | |
1164 | 1164 | | |
1165 | 1165 | | |
1166 | | - | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
1167 | 1173 | | |
1168 | 1174 | | |
1169 | 1175 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
36 | 51 | | |
37 | 52 | | |
38 | 53 | | |
39 | 54 | | |
40 | 55 | | |
| 56 | + | |
41 | 57 | | |
42 | 58 | | |
0 commit comments