1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

bugfix: always gather class templates

No clue why there are conditions on when templates are allowed to get picked up. I've removed this check which actually solves a problem in inherited assertions.

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
This commit is contained in:
Maximilian Bösing 2023-09-10 15:22:21 +02:00
parent f6f7c20f36
commit ad463f38e9
No known key found for this signature in database
GPG Key ID: 9A8988C93CEC81A3

View File

@ -48,9 +48,6 @@ class ClassTemplateParamCollector
if ($static_class_storage->template_extended_params
&& $method_name
&& !empty($non_trait_class_storage->overridden_method_ids[$method_name])
&& isset($class_storage->methods[$method_name])
&& (!isset($non_trait_class_storage->methods[$method_name]->return_type)
|| $class_storage->methods[$method_name]->inherited_return_type)
) {
foreach ($non_trait_class_storage->overridden_method_ids[$method_name] as $overridden_method_id) {
$overridden_storage = $codebase->methods->getStorage($overridden_method_id);