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

Unified Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/type/InterfaceTypeImpl.java

Issue 17712003: Bug fix for isSubtypeOf. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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/type/InterfaceTypeImpl.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/type/InterfaceTypeImpl.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/type/InterfaceTypeImpl.java
index 285481ffd21afd45ce7d7892361b8c10220c2600..5eebc029e68e2363360e18a66e0d6bcb5de2d9b6 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/type/InterfaceTypeImpl.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/type/InterfaceTypeImpl.java
@@ -515,7 +515,10 @@ public class InterfaceTypeImpl extends TypeImpl implements InterfaceType {
} else if (this.equals(type)) {
return true;
}
- return isSubtypeOf((InterfaceType) type, new HashSet<ClassElement>());
+ InterfaceTypeImpl thisType = substitute(
+ new Type[] {BottomTypeImpl.getInstance()},
+ new Type[] {DynamicTypeImpl.getInstance()});
+ return thisType.isSubtypeOf((InterfaceType) type, new HashSet<ClassElement>());
}
@Override

Powered by Google App Engine
This is Rietveld 408576698