mirror of
https://github.com/danog/psalm.git
synced 2025-01-06 04:59:14 +01:00
parent
5df2b771aa
commit
4e8fb9c37f
@ -779,11 +779,19 @@ class Methods
|
|||||||
if ((!$old_contained_by_new && !$new_contained_by_old)
|
if ((!$old_contained_by_new && !$new_contained_by_old)
|
||||||
|| ($old_contained_by_new && $new_contained_by_old)
|
|| ($old_contained_by_new && $new_contained_by_old)
|
||||||
) {
|
) {
|
||||||
$attempted_intersection = Type::intersectUnionTypes(
|
if ($old_contained_by_new && $new_contained_by_old) {
|
||||||
$overridden_storage->return_type,
|
$attempted_intersection = Type::intersectUnionTypes(
|
||||||
$candidate_type,
|
$candidate_type,
|
||||||
$source_analyzer->getCodebase()
|
$overridden_storage->return_type,
|
||||||
);
|
$source_analyzer->getCodebase()
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
$attempted_intersection = Type::intersectUnionTypes(
|
||||||
|
$overridden_storage->return_type,
|
||||||
|
$candidate_type,
|
||||||
|
$source_analyzer->getCodebase()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if ($attempted_intersection) {
|
if ($attempted_intersection) {
|
||||||
$self_class = $overridden_method_id->fq_class_name;
|
$self_class = $overridden_method_id->fq_class_name;
|
||||||
|
Loading…
Reference in New Issue
Block a user