mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Fix #2251 - add support for yielding from lists
This commit is contained in:
parent
22e35a7233
commit
3bb0016434
@ -245,6 +245,10 @@ class ReturnTypeCollector
|
||||
$type = $type->getGenericArrayType();
|
||||
}
|
||||
|
||||
if ($type instanceof Type\Atomic\TList) {
|
||||
$type = new Type\Atomic\TArray([Type::getInt(), $type->type_param]);
|
||||
}
|
||||
|
||||
if ($type instanceof Type\Atomic\TArray
|
||||
|| $type instanceof Type\Atomic\TIterable
|
||||
|| ($type instanceof Type\Atomic\TGenericObject
|
||||
|
Loading…
Reference in New Issue
Block a user