Skip to content

Commit

Permalink
Let's see what breaks without this hack
Browse files Browse the repository at this point in the history
  • Loading branch information
weirdan committed Feb 27, 2024
1 parent 4eec8bb commit 0ce62a5
Showing 1 changed file with 0 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -307,15 +307,6 @@ public static function verifyReturnType(
$source->getParentFQCLN(),
);

// hack until we have proper yield type collection
if ($function_like_storage
&& $function_like_storage->has_yield
&& !$inferred_yield_type
&& !$inferred_return_type->isVoid()
) {
$inferred_return_type = new Union([new TNamedObject('Generator')]);
}

if ($is_to_string) {
$union_comparison_results = new TypeComparisonResult();
if (!$inferred_return_type->hasMixed() &&
Expand Down

0 comments on commit 0ce62a5

Please sign in to comment.