--- a/langtools/src/share/classes/com/sun/tools/javac/code/Types.java Wed Dec 08 21:21:42 2010 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Types.java Thu Dec 09 15:50:10 2010 +0000
@@ -1033,12 +1033,7 @@
&& !disjointTypes(aHigh.allparams(), lowSub.allparams())
&& !disjointTypes(aLow.allparams(), highSub.allparams())
&& !disjointTypes(aLow.allparams(), lowSub.allparams())) {
- if (s.isInterface() &&
- !t.isInterface() &&
- t.isFinal() &&
- !isSubtype(t, s)) {
- return false;
- } else if (upcast ? giveWarning(a, b) :
+ if (upcast ? giveWarning(a, b) :
giveWarning(b, a))
warnStack.head.warnUnchecked();
return true;
@@ -3377,8 +3372,8 @@
public Type visitCapturedType(CapturedType t, Void s) {
Type bound = visitWildcardType(t.wildcard, null);
return (bound.contains(t)) ?
- (high ? syms.objectType : syms.botType) :
- bound;
+ erasure(bound) :
+ bound;
}
@Override
@@ -3386,7 +3381,7 @@
if (rewriteTypeVars) {
Type bound = high ?
(t.bound.contains(t) ?
- syms.objectType :
+ erasure(t.bound) :
visit(t.bound)) :
syms.botType;
return rewriteAsWildcardType(bound, t);