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

Unified Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/scope/EnclosedScope.java

Issue 32693003: Fix issue 13575 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: second attempt Created 7 years, 2 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: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/scope/EnclosedScope.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/scope/EnclosedScope.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/scope/EnclosedScope.java
index 449c83b13c3a841047a45900a4ee0e55e5c8523f..f188823441a51122c72f33a134b0b5bada9eec6d 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/scope/EnclosedScope.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/scope/EnclosedScope.java
@@ -16,7 +16,9 @@ package com.google.dart.engine.internal.scope;
import com.google.dart.engine.ast.Identifier;
import com.google.dart.engine.element.Element;
import com.google.dart.engine.element.LibraryElement;
+import com.google.dart.engine.error.AnalysisError;
import com.google.dart.engine.error.AnalysisErrorListener;
+import com.google.dart.engine.error.CompileTimeErrorCode;
import java.util.HashSet;
import java.util.Set;
@@ -90,7 +92,13 @@ public class EnclosedScope extends Scope {
return element;
}
if (hiddenNames.contains(name)) {
- return null;
+ getErrorListener().onError(
+ new AnalysisError(
+ getSource(),
+ identifier.getOffset(),
+ identifier.getLength(),
+ CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION));
+ //return null;
}
return enclosingScope.lookup(identifier, name, referencingLibrary);
}

Powered by Google App Engine
This is Rietveld 408576698