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

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

Issue 22846005: Report StaticWarningCode.UNDEFINED_IDENTIFIER when name is hidden, but not defined yet in block. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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/Scope.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/scope/Scope.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/scope/Scope.java
index c0e3f97bf8eaff3450f59368734f478188e0de40..3a6f7de8aa3d363f941846f9d5fe90beb22394a6 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/scope/Scope.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/scope/Scope.java
@@ -109,7 +109,8 @@ public abstract class Scope {
* @param element the element to be added to this scope
*/
protected void defineWithoutChecking(Element element) {
- definedNames.put(getName(element), element);
+ String name = getName(element);
+ definedNames.put(name, element);
}
/**

Powered by Google App Engine
This is Rietveld 408576698