You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hm, looks like ClosureType uses NonGenericTypeTrait, and thus does not report referenced template types at all. Perhaps it should implement inferTemplateTypes and getReferencedTemplateTypes the same way that CallableType does?
Closures cannot be generic, not until #8964 is implemented. But yeah, it should still implement inferTemplateTypes and getReferencedTemplateTypes because that's totally relevant even today.
Bug report
Phpstan allows to use type parameters where they cannot be used.
Code snippet that reproduces the problem
https://phpstan.org/r/8dc1c703-eb15-408a-a146-83c8ead2c840
Expected output
"covariant type A occurs in contravariant position"
Did PHPStan help you today? Did it make you happy in any way?
No response
The text was updated successfully, but these errors were encountered: