Skip to content
Permalink
Browse files

Fix #1875 - improve printing of iterable type

  • Loading branch information...
muglug committed Jun 30, 2019
1 parent ca53019 commit 62fb86aef098cb2a2276ba9f71a357f796b0c998
Showing with 6 additions and 1 deletion.
  1. +1 −1 src/Psalm/Type/Atomic/TIterable.php
  2. +5 −0 tests/TypeParseTest.php
@@ -46,7 +46,7 @@ public function getId()
{
$s = '';
foreach ($this->type_params as $type_param) {
$s .= $type_param->getKey() . ', ';
$s .= $type_param->getId() . ', ';
}
$extra_types = '';
@@ -216,6 +216,11 @@ public function testIntersectionOfIterables()
$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
*/

0 comments on commit 62fb86a

Please sign in to comment.
You can’t perform that action at this time.