1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 12:55:26 +01:00

Don’t recursively expand generic types

This commit is contained in:
Matt Brown 2021-02-07 11:31:42 -05:00
parent 8b5e0fc754
commit 649d1f6ad6

View File

@ -114,7 +114,8 @@ class TypeExpander
$static_class_type,
$parent_class,
$evaluate_class_constants,
$evaluate_conditional_types
$evaluate_conditional_types,
$expand_generic
);
if ($extra_type instanceof TNamedObject && $extra_type->extra_types) {
@ -161,7 +162,11 @@ class TypeExpander
)
)
);
// we don't want to expand generic types recursively
$expand_generic = false;
}
}
$return_type_lc = strtolower($return_type->value);