src/share/classes/com/sun/tools/javac/code/Types.java

changeset 736
e9e41c88b03e
parent 688
50f9ac2f4730
child 753
2536dedd897e
equal deleted inserted replaced
735:f2048d9c666e 736:e9e41c88b03e
3149 private boolean giveWarning(Type from, Type to) { 3149 private boolean giveWarning(Type from, Type to) {
3150 Type subFrom = asSub(from, to.tsym); 3150 Type subFrom = asSub(from, to.tsym);
3151 return to.isParameterized() && 3151 return to.isParameterized() &&
3152 (!(isUnbounded(to) || 3152 (!(isUnbounded(to) ||
3153 isSubtype(from, to) || 3153 isSubtype(from, to) ||
3154 ((subFrom != null) && isSameType(subFrom, to)))); 3154 ((subFrom != null) && containsType(to.allparams(), subFrom.allparams()))));
3155 } 3155 }
3156 3156
3157 private List<Type> superClosure(Type t, Type s) { 3157 private List<Type> superClosure(Type t, Type s) {
3158 List<Type> cl = List.nil(); 3158 List<Type> cl = List.nil();
3159 for (List<Type> l = interfaces(t); l.nonEmpty(); l = l.tail) { 3159 for (List<Type> l = interfaces(t); l.nonEmpty(); l = l.tail) {

mercurial