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

Fix supertype checks between int range and constant int union #1742

Merged
merged 1 commit into from Sep 23, 2022

Conversation

rvanvelzen
Copy link
Contributor

@ondrejmirtes
Copy link
Member

This is gonna fix quite a lot of issues I think :)

src/Type/UnionType.php Outdated Show resolved Hide resolved
src/Type/UnionType.php Outdated Show resolved Hide resolved
@ondrejmirtes
Copy link
Member

This is green now 🎉

@rvanvelzen rvanvelzen marked this pull request as ready for review September 23, 2022 09:35
@ondrejmirtes
Copy link
Member

Thank you!

@ondrejmirtes ondrejmirtes merged commit 0f2225c into phpstan:1.8.x Sep 23, 2022
@staabm
Copy link
Contributor

staabm commented Sep 23, 2022

really cool. free free to ping me for regression tests.. just in case there are too many

@rvanvelzen rvanvelzen deleted the bug-3383 branch September 23, 2022 09:55
@ondrejmirtes
Copy link
Member

These are fixed and in need of regression tests: phpstan/phpstan#6356 + phpstan/phpstan#7594

Additionally, I'd like if there were more tests checking when the integer range/constant integer combo does NOT accept each other, and also some tests and support for open intervals (when min or max are not defined).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants