Skip to content

Commit

Permalink
Merge pull request #8996 from weirdan/improve-type-invalid-reference-…
Browse files Browse the repository at this point in the history
…message

Fixes #8842
  • Loading branch information
weirdan committed Dec 23, 2022
2 parents 5979579 + bf6ef64 commit 08b73f2
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,11 @@ public function finish(PhpParser\Node\Stmt\ClassLike $node): ClassLikeStorage
);

$converted_aliases[$key] = new ClassTypeAlias(array_values($union->getAtomicTypes()));
} catch (TypeParseTreeException $e) {
$classlike_storage->docblock_issues[] = new InvalidDocblock(
'@psalm-type ' . $key . ' contains invalid reference: ' . $e->getMessage(),
new CodeLocation($this->file_scanner, $node, null, true),
);
} catch (Exception $e) {
$classlike_storage->docblock_issues[] = new InvalidDocblock(
'@psalm-type ' . $key . ' contains invalid references',
Expand Down

0 comments on commit 08b73f2

Please sign in to comment.