| Index: pkg/analyzer/lib/src/dart/analysis/search.dart
|
| diff --git a/pkg/analyzer/lib/src/dart/analysis/search.dart b/pkg/analyzer/lib/src/dart/analysis/search.dart
|
| index 1b2ae669a51c711840ed1b4078d7463ff8caccdd..1c569ed263e94a5fa64b72762b237203c49d378d 100644
|
| --- a/pkg/analyzer/lib/src/dart/analysis/search.dart
|
| +++ b/pkg/analyzer/lib/src/dart/analysis/search.dart
|
| @@ -93,13 +93,6 @@ class Search {
|
|
|
| Future<Null> _addResults(List<SearchResult> results, Element element,
|
| Map<IndexRelationKind, SearchResultKind> relationToResultKind) async {
|
| - String path = element.source.fullName;
|
| -
|
| - // If the file with the element is not known, then the element is not used.
|
| - if (!_driver.knownFiles.contains(path)) {
|
| - return;
|
| - }
|
| -
|
| // Prepare the element name.
|
| String name = element.displayName;
|
| if (element is ConstructorElement) {
|
| @@ -108,6 +101,7 @@ class Search {
|
|
|
| // Prepare the list of files that reference the element name.
|
| List<String> files = <String>[];
|
| + String path = element.source.fullName;
|
| if (name.startsWith('_')) {
|
| String libraryPath = element.library.source.fullName;
|
| if (_driver.addedFiles.contains(libraryPath)) {
|
|
|