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

Unified Diff: sdk/lib/_internal/compiler/implementation/mirrors_used.dart

Issue 304153014: Remove element from DynamicType. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix infinite loop. Created 6 years, 7 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: sdk/lib/_internal/compiler/implementation/mirrors_used.dart
diff --git a/sdk/lib/_internal/compiler/implementation/mirrors_used.dart b/sdk/lib/_internal/compiler/implementation/mirrors_used.dart
index 2a5cefb4340d6ec9b0e709a7088bf4500e676277..5285027c9335163caf7fec09806702d61210cdee 100644
--- a/sdk/lib/_internal/compiler/implementation/mirrors_used.dart
+++ b/sdk/lib/_internal/compiler/implementation/mirrors_used.dart
@@ -436,12 +436,12 @@ class MirrorUsageBuilder {
DartType apiTypeOf(Constant constant) {
DartType type = constant.computeType(compiler);
LibraryElement library = type.element.library;
- if (type.kind == TypeKind.INTERFACE && library.isInternalLibrary) {
+ if (type.isInterfaceType && library.isInternalLibrary) {
InterfaceType interface = type;
ClassElement cls = type.element;
cls.ensureResolved(compiler);
for (DartType supertype in cls.allSupertypes) {
- if (supertype.kind == TypeKind.INTERFACE
+ if (supertype.isInterfaceType
&& !supertype.element.library.isInternalLibrary) {
return interface.asInstanceOf(supertype.element);
}

Powered by Google App Engine
This is Rietveld 408576698