1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Fix #2618 setting list param from docblock

This commit is contained in:
Matthew Brown 2020-01-14 22:46:19 -05:00
parent 4a03c4aedd
commit 389af1bfc7
2 changed files with 6 additions and 1 deletions

View File

@ -111,7 +111,7 @@ class TList extends \Psalm\Type\Atomic
public function setFromDocblock()
{
$this->from_docblock = true;
$this->type_param->from_docblock = true;
$this->type_param->setFromDocblock();
}
public function replaceTemplateTypesWithStandins(

View File

@ -1056,6 +1056,11 @@ class AnnotationTest extends TestCase
foo($bar);'
],
'allowResourceInList' => [
'<?php
/** @param list<scalar|array|object|resource|null> $_s */
function foo(array $_s) : void { }'
],
];
}