1
0
Fork 0

Find references on unused symbol must not load referenced URIs

pull/392/head
Stephan Unverwerth 2017-06-09 20:48:50 +02:00
parent f10680e441
commit 258b905d9f
1 changed files with 12 additions and 9 deletions

View File

@ -221,9 +221,11 @@ class TextDocument
return []; return [];
} }
} }
$referenceUris = $this->index->getReferenceUris($fqn);
if (!empty($referenceUris)) {
$refDocuments = yield Promise\all(array_map( $refDocuments = yield Promise\all(array_map(
[$this->documentLoader, 'getOrLoad'], [$this->documentLoader, 'getOrLoad'],
$this->index->getReferenceUris($fqn) $referenceUris
)); ));
foreach ($refDocuments as $document) { foreach ($refDocuments as $document) {
$refs = $document->getReferenceNodesByFqn($fqn); $refs = $document->getReferenceNodesByFqn($fqn);
@ -234,6 +236,7 @@ class TextDocument
} }
} }
} }
}
return $locations; return $locations;
}); });
} }