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
Chained nullsafe method call wrongly induces caller's type #5868
Comments
@ondrejmirtes Quick fix would be to move I was not aware of this part and it's quite hard to wrap head around this logic. Perhaps we could get rid of the NullsafeOperatorHelper by passing the moreSpecificType to nested MethodCalls as well? |
Another example that reproduces the problem: https://phpstan.org/r/954e0684-5afd-4c23-bbe5-e9e56d92801d |
@ondrejmirtes I created a PR with the original "not-ideal but working" solution as I'm pretty sure this bothers many users :/ |
Fixed by: phpstan/phpstan-src#752 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Bug report
See snippet, found while upgrading from 0.12.99 to 1.0.0
Code snippet that reproduces the problem
https://phpstan.org/r/208a06db-9004-4c14-96c1-7f4ad80493da
Expected output
No error.
The text was updated successfully, but these errors were encountered: