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

Unified Diff: pkg/analyzer/lib/src/summary/index_unit.dart

Issue 1760243004: Implement search for local elements. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 | « pkg/analysis_server/test/services/search/search_engine2_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/summary/index_unit.dart
diff --git a/pkg/analyzer/lib/src/summary/index_unit.dart b/pkg/analyzer/lib/src/summary/index_unit.dart
index 19028b9f2bb78e31aa067524eddb0de20d691490..4dcb9808cb2935a85914de8c3ac96183d1cb213d 100644
--- a/pkg/analyzer/lib/src/summary/index_unit.dart
+++ b/pkg/analyzer/lib/src/summary/index_unit.dart
@@ -517,6 +517,10 @@ class _IndexContributor extends GeneralizingAstVisitor {
element.field, IndexRelationKind.IS_REFERENCED_BY, node, true);
return;
}
+ // ignore a local reference to a parameter
+ if (element is ParameterElement && node.parent is! Label) {
+ return;
+ }
// record specific relations
recordRelation(
element, IndexRelationKind.IS_REFERENCED_BY, node, isQualified);
« no previous file with comments | « pkg/analysis_server/test/services/search/search_engine2_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698