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:
parent
4a03c4aedd
commit
389af1bfc7
@ -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(
|
||||
|
@ -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 { }'
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user