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 26, 2024
1 parent 48271ce commit 4686918
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Psalm/Internal/Analyzer/FunctionLike/ReturnTypeAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,14 +308,14 @@ public static function verifyReturnType(
);

// 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 ($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 4686918

Please sign in to comment.