diff --git a/src/Psalm/Internal/Stubs/CoreGenericClasses.php b/src/Psalm/Internal/Stubs/CoreGenericClasses.php index 7bf8d6363..a55f3d61c 100644 --- a/src/Psalm/Internal/Stubs/CoreGenericClasses.php +++ b/src/Psalm/Internal/Stubs/CoreGenericClasses.php @@ -106,20 +106,20 @@ interface OuterIterator extends Iterator { /** * @return Iterator */ - public function getInnerIterator() : Iterator; + public function getInnerIterator(); } /** * @template-covariant TKey * @template-covariant TValue * - * @template-extends OuterIterator + * @template-implements OuterIterator */ class IteratorIterator implements OuterIterator { /** * @return Iterator */ - public function getInnerIterator() : Iterator {} + public function getInnerIterator() {} /** * Return the current element @@ -170,6 +170,17 @@ class IteratorIterator implements OuterIterator { public function rewind() {} } +/** + * @template-covariant TKey + * @template-covariant TValue + * + * @template-extends IteratorIterator + */ +class FilterIterator extends IteratorIterator { + public abstract function accept () : bool {} + } + + /** * @template-covariant TKey * @template-covariant TValue