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"); |
} |
} |