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

Unified Diff: compiler/java/com/google/dart/compiler/type/Types.java

Issue 10830349: Issue 4394. Consider type arguments when build super types list (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 404712705bb0c122126c55007452648534a6164b..0c2dad12f8b250d37234edbdaa68e2bc2db6dbb4 100644
--- a/compiler/java/com/google/dart/compiler/type/Types.java
+++ b/compiler/java/com/google/dart/compiler/type/Types.java
@@ -72,11 +72,14 @@ public class Types {
if (interfaceType.getElement().isInterface()) {
types.add(interfaceType);
for (InterfaceType intf : interfaceType.getElement().getInterfaces()) {
+ intf = asSupertype(interfaceType, intf);
types.addAll(getSuperTypes(intf));
}
} else {
- for (InterfaceType st = interfaceType; st != null; st = st.getElement().getSupertype()) {
+ InterfaceType st = interfaceType;
+ while (st != null) {
types.add(st);
+ st = asSupertype(st, st.getElement().getSupertype());
}
}
}
@@ -385,7 +388,7 @@ public class Types {
}
}
- private InterfaceType asSupertype(InterfaceType type, InterfaceType supertype) {
+ private static InterfaceType asSupertype(InterfaceType type, InterfaceType supertype) {
if (supertype == null) {
return null;
}
« no previous file with comments | « no previous file | compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698