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

Unified Diff: pkg/analysis_services/lib/src/index/index_contributor.dart

Issue 398093003: Fix for name declaration indexing in for-in statement. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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
Index: pkg/analysis_services/lib/src/index/index_contributor.dart
diff --git a/pkg/analysis_services/lib/src/index/index_contributor.dart b/pkg/analysis_services/lib/src/index/index_contributor.dart
index 69818a3660c30f287cd6e97aac32b60e618af649..c1c850ecf982e01b57866f85575f337245ba5ca6 100644
--- a/pkg/analysis_services/lib/src/index/index_contributor.dart
+++ b/pkg/analysis_services/lib/src/index/index_contributor.dart
@@ -532,6 +532,17 @@ class _IndexContributor extends GeneralizingAstVisitor<Object> {
}
@override
+ Object visitDeclaredIdentifier(DeclaredIdentifier node) {
+ LocalVariableElement element = node.element;
+ enterScope(element);
+ try {
+ return super.visitDeclaredIdentifier(node);
+ } finally {
+ _exitScope();
+ }
+ }
+
+ @override
Object visitExportDirective(ExportDirective node) {
ExportElement element = node.element;
if (element != null) {

Powered by Google App Engine
This is Rietveld 408576698