Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(698)

Unified Diff: pkg/analysis_server/lib/src/services/search/search_engine_internal.dart

Issue 2959273002: Report only private members in the same library as overrides. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/search/search_engine_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/services/search/search_engine_internal.dart
diff --git a/pkg/analysis_server/lib/src/services/search/search_engine_internal.dart b/pkg/analysis_server/lib/src/services/search/search_engine_internal.dart
index b551b48123e7d993ff0966d38af10892d910a65b..8e1519ed165766b5da734bac396ce0646b1567f1 100644
--- a/pkg/analysis_server/lib/src/services/search/search_engine_internal.dart
+++ b/pkg/analysis_server/lib/src/services/search/search_engine_internal.dart
@@ -23,6 +23,7 @@ class SearchEngineImpl implements SearchEngine {
Future<Set<String>> membersOfSubtypes(ClassElement type) async {
List<AnalysisDriver> drivers = _drivers.toList();
+ String libraryUriStr = type.librarySource.uri.toString();
bool hasSubtypes = false;
Set<String> visitedIds = new Set<String>();
Set<String> members = new Set<String>();
@@ -34,9 +35,11 @@ class SearchEngineImpl implements SearchEngine {
for (AnalysisDriver driver in drivers) {
List<SubtypeResult> subtypes =
await driver.search.subtypes(type: type, subtype: subtype);
- for (var subtype in subtypes) {
+ for (SubtypeResult subtype in subtypes) {
hasSubtypes = true;
- members.addAll(subtype.members);
+ members.addAll(subtype.libraryUri == libraryUriStr
+ ? subtype.members
+ : subtype.members.where((name) => !name.startsWith('_')));
await addMembers(null, subtype);
}
}
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/search/search_engine_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698