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

Trap return type parse issues in fixUpLocalType

This commit is contained in:
Matthew Brown 2018-03-27 08:07:44 -04:00
parent 843a8a4e40
commit 504a057071

View File

@ -958,13 +958,13 @@ class DependencyFinderVisitor extends PhpParser\NodeVisitorAbstract implements P
}
if ($docblock_return_type) {
$fixed_type_string = Type::fixUpLocalType(
$docblock_return_type,
$this->aliases,
$this->function_template_types + $this->class_template_types
);
try {
$fixed_type_string = Type::fixUpLocalType(
$docblock_return_type,
$this->aliases,
$this->function_template_types + $this->class_template_types
);
$storage->return_type = Type::parseString($fixed_type_string);
$storage->return_type->setFromDocblock();