--- a/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java Thu Oct 23 17:59:16 2008 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java Thu Oct 23 17:59:43 2008 +0100
@@ -361,6 +361,8 @@
for (Symbol sup = clazz;
sup != null && sup != this.owner;
sup = types.supertype(sup.type).tsym) {
+ while (sup.type.tag == TYPEVAR)
+ sup = sup.type.getUpperBound().tsym;
if (sup.type.isErroneous())
return true; // error recovery
if ((sup.flags() & COMPOUND) != 0)
@@ -1183,7 +1185,9 @@
* as possible implementations.
*/
public MethodSymbol implementation(TypeSymbol origin, Types types, boolean checkResult) {
- for (Type t = origin.type; t.tag == CLASS; t = types.supertype(t)) {
+ for (Type t = origin.type; t.tag == CLASS || t.tag == TYPEVAR; t = types.supertype(t)) {
+ while (t.tag == TYPEVAR)
+ t = t.getUpperBound();
TypeSymbol c = t.tsym;
for (Scope.Entry e = c.members().lookup(name);
e.scope != null;