Skip to content

Commit

Permalink
Fix #3801 - convert static to Foo&static when @method is given
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Jul 30, 2020
1 parent 96ce488 commit abe91ad
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,17 @@ public static function handleMissingOrMagicMethod(
) ?: Type::getMixed();
}

$return_type_candidate = \Psalm\Internal\Type\TypeExpander::expandUnion(
$codebase,
$return_type_candidate,
$fq_class_name,
$fq_class_name,
$class_storage->parent_class,
true,
false,
$class_storage->final
);

if (!$result->return_type) {
$result->return_type = $return_type_candidate;
} else {
Expand Down

0 comments on commit abe91ad

Please sign in to comment.