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
Nested generic argument bound is not correctly resolved to native type #4643
Comments
@hrach After the latest commit in dev-master, PHPStan now reports different result with your code snippet: @@ @@
-12: PHPDoc tag @param for parameter $entity with type F is not subtype of native type Entity.
-12: PHPDoc tag @return with type mixed is not subtype of native type Entity.
-12: Template type F of method Repository::store() is not referenced in a parameter.
+No errors |
Wow, thanks for fixing it, a non trivial fix I would expect. |
Yeah, many places still didn't think that template types can be nested like that, but at least the type system is more robust (and ready for more template type bounds!) |
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
results in
Code snippet that reproduces the problem
https://phpstan.org/r/4f86dceb-20e1-406d-92d4-eccd8da4c31b
Expected output
no error
The text was updated successfully, but these errors were encountered: