Skip to content

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

Merged
ondrejmirtes merged 1 commit intophpstan:1.8.xfrom
rvanvelzen:bug-3383
Sep 23, 2022
Merged

Fix supertype checks between int range and constant int union#1742
ondrejmirtes merged 1 commit intophpstan:1.8.xfrom
rvanvelzen:bug-3383

Conversation

@rvanvelzen
Copy link
Copy Markdown
Contributor

@rvanvelzen rvanvelzen marked this pull request as draft September 22, 2022 13:06
@ondrejmirtes
Copy link
Copy Markdown
Member

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

@ondrejmirtes
Copy link
Copy Markdown
Member

This is green now 🎉

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

Thank you!

@ondrejmirtes ondrejmirtes merged commit 0f2225c into phpstan:1.8.x Sep 23, 2022
@staabm
Copy link
Copy Markdown
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
Copy Markdown
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

Development

Successfully merging this pull request may close these issues.

Scalar type does not match IntegerRange which describes the same range

3 participants