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

Implement template type inference from conditional return type #1465

Merged
merged 1 commit into from Sep 19, 2022

Conversation

rvanvelzen
Copy link
Contributor

Fix for phpstan/phpstan#7141. This does not actually work yet, but fixing it in an obvious way breaks other tests

@ondrejmirtes
Copy link
Member

Also please add a test so that "is not referenced in a parameter" is not reported :) (but it should be reported if the template type is not referenced in a parameter nor in conditional type target).

@rvanvelzen rvanvelzen marked this pull request as ready for review September 19, 2022 13:45
@ondrejmirtes ondrejmirtes merged commit 43d3652 into phpstan:1.8.x Sep 19, 2022
@ondrejmirtes
Copy link
Member

Nice! Thank you very much.

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