mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Fix #1875 - improve printing of iterable type
This commit is contained in:
parent
ca53019d6b
commit
62fb86aef0
@ -46,7 +46,7 @@ class TIterable extends Atomic
|
||||
{
|
||||
$s = '';
|
||||
foreach ($this->type_params as $type_param) {
|
||||
$s .= $type_param->getKey() . ', ';
|
||||
$s .= $type_param->getId() . ', ';
|
||||
}
|
||||
|
||||
$extra_types = '';
|
||||
|
@ -216,6 +216,11 @@ class TypeParseTest extends TestCase
|
||||
$this->assertSame('iterable<mixed, A>&iterable<mixed, B>', (string) Type::parseString('iterable<A>&iterable<B>'));
|
||||
}
|
||||
|
||||
public function testIterableContainingObjectLike()
|
||||
{
|
||||
$this->assertSame('iterable<string, array{0: int}>', Type::parseString('iterable<string, array{int}>')->getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user