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

Unified Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/ScopedVisitor.java

Issue 62843003: Issue 14766. It is still compile-time error to reference variable from its initializer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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 | editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/scope/EnclosedScope.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/ScopedVisitor.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/ScopedVisitor.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/ScopedVisitor.java
index ed25a92aeaa653917c9afa863847697791fb15c1..02926ed5addcf9b0b2f63ab0d96b0b46b2a3f050 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/ScopedVisitor.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/ScopedVisitor.java
@@ -449,6 +449,7 @@ public abstract class ScopedVisitor extends UnifyingASTVisitor<Void> {
@Override
public Void visitVariableDeclaration(VariableDeclaration node) {
+ super.visitVariableDeclaration(node);
if (!(node.getParent().getParent() instanceof TopLevelVariableDeclaration)
&& !(node.getParent().getParent() instanceof FieldDeclaration)) {
VariableElement element = node.getElement();
@@ -456,7 +457,6 @@ public abstract class ScopedVisitor extends UnifyingASTVisitor<Void> {
nameScope.define(element);
}
}
- super.visitVariableDeclaration(node);
return null;
}
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/scope/EnclosedScope.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698