Skip to content

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Oct 23, 2022

to bring both implementations in sync, and therefore on feature parity.

next step, in a followup PR, will be to add IntegerRangeType support to pow

@staabm staabm marked this pull request as ready for review October 23, 2022 08:39
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

Comment on lines +1134 to +1135
!$leftType instanceof NeverType &&
!$rightType instanceof NeverType &&
Copy link
Contributor Author

@staabm staabm Oct 23, 2022

Choose a reason for hiding this comment

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

I added these 2 NeverType guard conditions, to not regress existing integer-range-math tests in

assertType('*NEVER*', $i ** 2);
assertType('*NEVER*', 2 ** $i);

@ondrejmirtes ondrejmirtes merged commit bde2180 into phpstan:1.9.x Oct 23, 2022
@ondrejmirtes
Copy link
Member

Thank you!

@staabm staabm deleted the refactor-pow branch October 23, 2022 13:25
@VincentLanglet
Copy link
Contributor

I think it solve phpstan/phpstan#2009 @ondrejmirtes @staabm, no ?

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.

4 participants