--- old/src/share/classes/com/sun/tools/javac/code/Types.java 2010-09-10 17:47:42.804842474 +0100 +++ new/src/share/classes/com/sun/tools/javac/code/Types.java 2010-09-10 17:47:42.715417441 +0100 @@ -331,6 +331,14 @@ if (s.tag >= firstPartialTag) return isSuperType(s, t); + if (s.isCompound()) { + for (Type s2 : interfaces(s).prepend(supertype(s))) { + if (!isSubtype(t, s2, capture)) + return false; + } + return true; + } + Type lower = lowerBound(s); if (s != lower) return isSubtype(capture ? capture(t) : t, lower, false); @@ -2766,6 +2774,14 @@ /** * Capture conversion as specified by JLS 3rd Ed. */ + + public List capture(List ts) { + List buf = List.nil(); + for (Type t : ts) { + buf = buf.prepend(capture(t)); + } + return buf.reverse(); + } public Type capture(Type t) { if (t.tag != CLASS) return t;