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

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

Issue 9149008: Fixes for parsing warnigs, issue 1060. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 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: compiler/java/com/google/dart/compiler/resolver/SupertypeResolver.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/SupertypeResolver.java b/compiler/java/com/google/dart/compiler/resolver/SupertypeResolver.java
index 1d1473708495acc9b6d1295c699cb08140e2a68c..8b13de4d5ca5406b33fcbbd94bdf43dfc6a0af6f 100644
--- a/compiler/java/com/google/dart/compiler/resolver/SupertypeResolver.java
+++ b/compiler/java/com/google/dart/compiler/resolver/SupertypeResolver.java
@@ -6,8 +6,6 @@ package com.google.dart.compiler.resolver;
import com.google.common.collect.ImmutableSet;
import com.google.dart.compiler.DartCompilerContext;
-import com.google.dart.compiler.DartSource;
-import com.google.dart.compiler.LibrarySource;
import com.google.dart.compiler.Source;
import com.google.dart.compiler.ast.DartClass;
import com.google.dart.compiler.ast.DartFunctionTypeAlias;
@@ -143,15 +141,7 @@ public class SupertypeResolver {
* implementation.
*/
static boolean isCoreLibrarySource(Source source) {
- if (source instanceof DartSource) {
- DartSource dartSource = (DartSource) source;
- LibrarySource library = dartSource.getLibrary();
- if (library != null) {
- String libraryName = library.getName();
- return libraryName.equals("dart://core/com/google/dart/corelib/corelib.dart")
- || libraryName.equals("dart://core/com/google/dart/corelib/corelib_impl.dart");
- }
- }
- return false;
+ return Elements.isLibrarySource(source, "corelib.dart")
+ || Elements.isLibrarySource(source, "corelib_impl.dart");
}
}

Powered by Google App Engine
This is Rietveld 408576698