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

changeset 1916
558fe98d1ac0
parent 1907
e990e6bcecbe
child 1919
3155e77d2676
equal deleted inserted replaced
1915:129751018061 1916:558fe98d1ac0
132 * and lower bounds. 132 * and lower bounds.
133 * @param t a type 133 * @param t a type
134 * @return the upper bound of the given type 134 * @return the upper bound of the given type
135 */ 135 */
136 public Type upperBound(Type t) { 136 public Type upperBound(Type t) {
137 return upperBound.visit(t); 137 return upperBound.visit(t).unannotatedType();
138 } 138 }
139 // where 139 // where
140 private final MapVisitor<Void> upperBound = new MapVisitor<Void>() { 140 private final MapVisitor<Void> upperBound = new MapVisitor<Void>() {
141 141
142 @Override 142 @Override
1128 if (!visit(supertype(t), supertype(s))) 1128 if (!visit(supertype(t), supertype(s)))
1129 return false; 1129 return false;
1130 1130
1131 HashSet<UniqueType> set = new HashSet<UniqueType>(); 1131 HashSet<UniqueType> set = new HashSet<UniqueType>();
1132 for (Type x : interfaces(t)) 1132 for (Type x : interfaces(t))
1133 set.add(new UniqueType(x, Types.this)); 1133 set.add(new UniqueType(x.unannotatedType(), Types.this));
1134 for (Type x : interfaces(s)) { 1134 for (Type x : interfaces(s)) {
1135 if (!set.remove(new UniqueType(x, Types.this))) 1135 if (!set.remove(new UniqueType(x.unannotatedType(), Types.this)))
1136 return false; 1136 return false;
1137 } 1137 }
1138 return (set.isEmpty()); 1138 return (set.isEmpty());
1139 } 1139 }
1140 return t.tsym == s.tsym 1140 return t.tsym == s.tsym

mercurial