mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
parent
470bf807b7
commit
bb1c8a9d74
@ -504,7 +504,9 @@ class TypeCombination
|
||||
foreach ($combination->object_type_params as $generic_type => $generic_type_params) {
|
||||
$generic_type = substr($generic_type, 0, (int) strpos($generic_type, '<'));
|
||||
|
||||
$new_types[] = new TGenericObject($generic_type, $generic_type_params);
|
||||
$generic_object = new TGenericObject($generic_type, $generic_type_params);
|
||||
$generic_object->extra_types = $combination->extra_types;
|
||||
$new_types[] = $generic_object;
|
||||
}
|
||||
|
||||
if ($combination->class_string_types) {
|
||||
|
@ -200,6 +200,17 @@ class TypeParseTest extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testIteratorAndTraversableOrNull()
|
||||
{
|
||||
$this->assertSame(
|
||||
'Iterator<mixed, int>&Traversable|null',
|
||||
(string) Type::parseString('Iterator<mixed, int>&Traversable|null')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user