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
When two if-conditions are using random_int functions with the same arguments, then the second of the conditions is inheriting the limitations of the previous one.
Comparison operation "<=" between int<6, 10> and 5 is always false.
Expected output
No issue should be detected.
The text was updated successfully, but these errors were encountered:
porebskk
changed the title
Two following random_int function calls with the same arguments lead to false positive
Two following conditions with random_int and an inequality operator leads to false positive
Dec 5, 2020
Bug report
When two if-conditions are using random_int functions with the same arguments, then the second of the conditions is inheriting the limitations of the previous one.
Code snippet that reproduces the problem
https://phpstan.org/r/6b6afb0e-4fd8-43d0-8878-2e68fab50722
Current false positive
Comparison operation "<=" between int<6, 10> and 5 is always false.
Expected output
No issue should be detected.
The text was updated successfully, but these errors were encountered: