Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More precise mixed-type subtraction #3434

Merged
merged 21 commits into from
Sep 22, 2024
Merged

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Sep 12, 2024

Mixed->toInteger() part of #3420

@staabm staabm force-pushed the mixsub2 branch 3 times, most recently from ff4d4b5 to efacfdc Compare September 12, 2024 17:24
new ConstantIntegerType(0),
new ConstantArrayType([], []),
new StringType(),
new FloatType()
Copy link
Contributor Author

@staabm staabm Sep 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0.1 also casts to 0 (found with the new tool)

https://3v4l.org/IcWTK

@staabm staabm marked this pull request as ready for review September 12, 2024 18:01
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

@ondrejmirtes ondrejmirtes merged commit 920f872 into phpstan:1.12.x Sep 22, 2024
481 of 499 checks passed
@ondrejmirtes
Copy link
Member

Yeah, this is correct :) Thanks!

@staabm staabm deleted the mixsub2 branch September 22, 2024 12:49
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.

3 participants