Generic template of class and method mixup #9975
-
|
Hello there 👋 Given the following example: https://phpstan.org/r/5b601b92-3518-4f51-9de6-0387b28ebfd5 Is it possible to define this correctly, so PHPStan could determine, that What I ask myself is, why is Would that be a bug, or am I doing something wrong? 😁 Best regards and thanks in advance for your help 🙂 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
With |
Beta Was this translation helpful? Give feedback.
static<T>does not have a good support right now because you can't assume the child class have the same number of@templatewith the same meaning and the same order.With
@phpstan-consistent-templates(there's an open PR about it) it's gonna be much more useful 😊