Skip to content

Add regression test for #15782 - #7137

Merged
ondrejmirtes merged 2 commits into
2.3.xfrom
bug-15782-regression-test
Nov 24, 2026
Merged

ondrejmirtes merged 2 commits into
2.3.xfrom
bug-15782-regression-test

Conversation

@ondrejmirtes

Copy link
Copy Markdown
Member

Regression test for the false positive Comparison operation ">" between float<2.0, 58.0> and 0 is always true. on while ($q-- > 0) with a float range, fixed by #7084.

The test fails with the MutatingScope change from #7084 reverted, reporting exactly that error.

Closes phpstan/phpstan#15782

@ondrejmirtes
ondrejmirtes merged commit 4f6609e into 2.3.x Nov 24, 2026
8 checks passed
@ondrejmirtes
ondrejmirtes deleted the bug-15782-regression-test branch November 24, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Decrement of a float range in a loop condition is not generalized: "Comparison operation ">" ... is always true" (regression in 2.3.6)

1 participant