1.1 --- a/src/share/classes/com/sun/tools/javac/comp/Resolve.java Tue Apr 12 20:56:16 2011 -0700 1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Resolve.java Tue Apr 12 20:58:06 2011 -0700 1.3 @@ -770,12 +770,9 @@ 1.4 return ambiguityError(m1, m2); 1.5 // both abstract, neither overridden; merge throws clause and result type 1.6 Symbol mostSpecific; 1.7 - Type result2 = mt2.getReturnType(); 1.8 - if (mt2.tag == FORALL) 1.9 - result2 = types.subst(result2, ((ForAll)mt2).tvars, ((ForAll)mt1).tvars); 1.10 - if (types.isSubtype(mt1.getReturnType(), result2)) 1.11 + if (types.returnTypeSubstitutable(mt1, mt2)) 1.12 mostSpecific = m1; 1.13 - else if (types.isSubtype(result2, mt1.getReturnType())) 1.14 + else if (types.returnTypeSubstitutable(mt2, mt1)) 1.15 mostSpecific = m2; 1.16 else { 1.17 // Theoretically, this can't happen, but it is possible