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 TypeCombinator::union() for intersection of array and template type #1444

Merged
merged 1 commit into from Jun 20, 2022

Conversation

rvanvelzen
Copy link
Contributor

@ondrejmirtes ondrejmirtes merged commit b1069e1 into phpstan:1.7.x Jun 20, 2022
@ondrejmirtes
Copy link
Member

Thank you!

@rvanvelzen rvanvelzen deleted the bug-4117 branch June 20, 2022 07:39
@ondrejmirtes
Copy link
Member

I've added a type inference test: 98ab8c9

I think that the results in if/else are correct, but the type below the if/else should be better because it has subtracted falsy values but in fact the returned type can still be falsy. (The union of the types inside if/else is probably wrong).

@AJenbo
Copy link
Contributor

AJenbo commented Jun 20, 2022

Nice work :)

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