You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<?php namespace Some\Foo;
class Moment {}
/**
* @implements \Iterator<Moment>
*/
final class Period implements \Iterator
{
}
/**
* @implements \RecursiveIterator<Moment>
*/
final class PeriodRecursive implements \RecursiveIterator
{
}
Expected output
No error is returned, as \RecursiveIterator works the same as \Iterator
The text was updated successfully, but these errors were encountered:
Bug report
@implements tag on a
\RecursiveIterator
doesn't work, but it does with\Iterator
.The following error is being reported:
Digging into the source code, I found this commit "reverting" the change: phpstan/phpstan-src@aa92b5b
So I assume this is not a bug and it's intentional, but I'm not understanding why this was reverted.
Code snippet that reproduces the problem
Link to the playground, please ignore missing method errors:
https://phpstan.org/r/f5382215-922f-4453-a7d6-de0ae9a524d6
Expected output
No error is returned, as
\RecursiveIterator
works the same as\Iterator
The text was updated successfully, but these errors were encountered: