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

Unified Diff: compiler/java/com/google/dart/compiler/resolver/Elements.java

Issue 11280135: Issue 6836. Using undeclared identifier in static context is now warning. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
Index: compiler/java/com/google/dart/compiler/resolver/Elements.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/Elements.java b/compiler/java/com/google/dart/compiler/resolver/Elements.java
index b95d48cd61da7120003192662e85f909a7290c82..a83dfe38bf4298d6e19798ca5a2e615bde830b6b 100644
--- a/compiler/java/com/google/dart/compiler/resolver/Elements.java
+++ b/compiler/java/com/google/dart/compiler/resolver/Elements.java
@@ -766,9 +766,17 @@ static FieldElementImplementation fieldFromNode(DartField node,
|| Elements.isLibrarySource(source, "/core/core.dart");
}
+ public static boolean isCollectionLibrarySource(Source source) {
+ return Elements.isLibrarySource(source, "/collection/collection.dart");
+ }
+
public static boolean isHtmlLibrarySource(Source source) {
return Elements.isLibrarySource(source, "/html/dartium/html_dartium.dart");
}
+
+ public static boolean isSourceName(Source source, String requiredName) {
+ return source.getName().equals(requiredName);
+ }
/**
* @return the {@link LibraryElement} which declares given {@link Element}.

Powered by Google App Engine
This is Rietveld 408576698