Skip to content

Commit

Permalink
Fix #2618 setting list param from docblock
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Jan 15, 2020
1 parent 4a03c4a commit 389af1b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Psalm/Type/Atomic/TList.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function getKey()
public function setFromDocblock()
{
$this->from_docblock = true;
$this->type_param->from_docblock = true;
$this->type_param->setFromDocblock();
}

public function replaceTemplateTypesWithStandins(
Expand Down
5 changes: 5 additions & 0 deletions tests/AnnotationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,11 @@ function foo(array $_bar) : void { }
foo($bar);'
],
'allowResourceInList' => [
'<?php
/** @param list<scalar|array|object|resource|null> $_s */
function foo(array $_s) : void { }'
],
];
}

Expand Down

0 comments on commit 389af1b

Please sign in to comment.