-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
Description
Bug report
Installed version: 0.12.14
It seams that array is not considered as valid iterable, while array is iterable: https://www.php.net/manual/en/language.types.iterable.php
Code snippet that reproduces the problem
<?php declare(strict_types = 1);
class HelloWorld
{
/**
* @template T
* @return iterable<T>
*/
public function getIterable(): iterable
{
return [];
}
}
https://phpstan.org/r/15458536-75a3-4a6b-9988-3d3999fe6441
Expected output
OK
Code should pass check.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels