Skip to content

Commit c79d3d2

Browse files
authored
Update DefinitionResolver.php
from issue felixfbecker#326
1 parent 546660f commit c79d3d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DefinitionResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ public function resolveExpressionNodeToType(Node\Expr $expr): Type
441441
}
442442
$fqn = (string)($expr->getAttribute('namespacedName') ?? $expr->name);
443443
$def = $this->index->getDefinition($fqn, true);
444-
if ($def !== null) {
444+
if ($def !== null && $def->type!= null) {
445445
return $def->type;
446446
}
447447
}

0 commit comments

Comments
 (0)