// test: IteratorAggregate with @implements generic resolves item type in foreach
// feature: completion
// Adapted from phpactor foreach/generic_iterator_aggregate.test
// expect: assertMethod(
---
<?php
class TypeAssertion {
public function assertMethod(): void {}
}
/**
* @implements \IteratorAggregate<array-key, TypeAssertion>
*/
final class TypeAssertions implements \IteratorAggregate {}
function test(TypeAssertions $assertions): void
{
foreach ($assertions as $typeAssertion) {
$typeAssertion-><>
}
}