Skip to content

Commit

Permalink
Catch errors during yield annotation tokenisation
Browse files Browse the repository at this point in the history
Fixes #3430
  • Loading branch information
muglug committed May 26, 2020
1 parent 3da3d61 commit b4855b3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Psalm/Internal/PhpVisitor/ReflectorVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -1198,14 +1198,14 @@ function (array $l, array $r) : int {
}

if ($docblock_info->yield) {
$yield_type_tokens = TypeTokenizer::getFullyQualifiedTokens(
$docblock_info->yield,
$this->aliases,
$storage->template_types,
$this->type_aliases
);

try {
$yield_type_tokens = TypeTokenizer::getFullyQualifiedTokens(
$docblock_info->yield,
$this->aliases,
$storage->template_types,
$this->type_aliases
);

$yield_type = TypeParser::parseTokens(
$yield_type_tokens,
null,
Expand Down

0 comments on commit b4855b3

Please sign in to comment.