mirror of
https://github.com/danog/psalm.git
synced 2025-01-21 21:31:13 +01:00
Fix #3418 - don’t override with send type when @psalm-yield is given
This commit is contained in:
parent
4d149de764
commit
7caaa64825
@ -186,7 +186,7 @@ class YieldAnalyzer
|
||||
|
||||
$storage = $source->getFunctionLikeStorage($statements_analyzer);
|
||||
|
||||
if ($storage->return_type) {
|
||||
if ($storage->return_type && !$yield_type) {
|
||||
foreach ($storage->return_type->getAtomicTypes() as $atomic_return_type) {
|
||||
if ($atomic_return_type instanceof Type\Atomic\TNamedObject
|
||||
&& $atomic_return_type->value === 'Generator'
|
||||
|
Loading…
x
Reference in New Issue
Block a user