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 interaction between template type and intersection type #955

Merged
merged 1 commit into from Jan 30, 2022

Conversation

arnaud-lb
Copy link
Contributor

This fixes phpstan/phpstan#6210 by ensuring that TemplateType | (TemplateType & something) is collapsed to TemplateType. This was not happening because TemplateType was not considered to be a super type of an intersection containing itself.

@ondrejmirtes
Copy link
Member

Thank you, I’d love to merge this, it even fixed an ignored bug in one of the integration-tested projects 😊

@arnaud-lb arnaud-lb marked this pull request as ready for review January 29, 2022 16:21
@ondrejmirtes ondrejmirtes merged commit f8af5dc into phpstan:master Jan 30, 2022
@ondrejmirtes
Copy link
Member

Thank you!

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