1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Fix #2567 - still remap params in some circumstances

This commit is contained in:
Brown 2020-01-07 13:01:10 -05:00
parent 702ca34c41
commit 024ec38aa1
2 changed files with 22 additions and 0 deletions

View File

@ -1877,6 +1877,8 @@ class TypeAnalyzer
$input_type_part->value,
$generic_params
);
$container_type_part->remapped_params = false;
}
}

View File

@ -2740,6 +2740,26 @@ class ClassTemplateExtendsTest extends TestCase
public function zip(): C;
}',
],
'implementsParameterisedIterator' => [
'<?php
/**
* @implements \IteratorAggregate<int,\stdClass>
*/
class SelectEntries implements \IteratorAggregate
{
public function getIterator(): SelectIterator {
return new SelectIterator();
}
}
/**
* @implements \Iterator<int,\stdClass>
* @psalm-suppress UnimplementedInterfaceMethod
*/
class SelectIterator implements \Iterator
{
}'
],
];
}