Index: compiler/java/com/google/dart/compiler/type/Types.java |
diff --git a/compiler/java/com/google/dart/compiler/type/Types.java b/compiler/java/com/google/dart/compiler/type/Types.java |
index 44f401e282e6f357ddcd93d9b9dbb679aa290622..8e83daf9a3bd62d52752853f8f0741ede31b9d9e 100644 |
--- a/compiler/java/com/google/dart/compiler/type/Types.java |
+++ b/compiler/java/com/google/dart/compiler/type/Types.java |
@@ -344,6 +344,21 @@ public class Types { |
return isSubtype(tBound, sv); |
} |
} |
+ // May be concrete InterfaceType. |
+ if (t.getKind() == TypeKind.INTERFACE) { |
+ InterfaceType ti = (InterfaceType) t; |
+ Type sBound = sv.getTypeVariableElement().getBound(); |
+ if (sBound == null) { |
+ return true; |
+ } |
+ // Prevent cycle. |
+ if (sBound.equals(sv)) { |
+ return false; |
+ } |
+ if (sBound.getKind() == TypeKind.INTERFACE) { |
+ return isSubtype(ti, sBound); |
+ } |
+ } |
// no |
return false; |
} |