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

changeset 1348
573ceb23beeb
parent 1347
1408af4cd8b0
child 1357
c75be5bc5283
equal deleted inserted replaced
1347:1408af4cd8b0 1348:573ceb23beeb
1218 public <R,S> R accept(Type.Visitor<R,S> v, S s) { 1218 public <R,S> R accept(Type.Visitor<R,S> v, S s) {
1219 return v.visitUndetVar(this, s); 1219 return v.visitUndetVar(this, s);
1220 } 1220 }
1221 1221
1222 public UndetVar(TypeVar origin, Types types) { 1222 public UndetVar(TypeVar origin, Types types) {
1223 this(origin, types, true);
1224 }
1225
1226 public UndetVar(TypeVar origin, Types types, boolean includeBounds) {
1223 super(UNDETVAR, origin); 1227 super(UNDETVAR, origin);
1224 bounds = new EnumMap<InferenceBound, List<Type>>(InferenceBound.class); 1228 bounds = new EnumMap<InferenceBound, List<Type>>(InferenceBound.class);
1225 bounds.put(InferenceBound.UPPER, types.getBounds(origin)); 1229 bounds.put(InferenceBound.UPPER, includeBounds ? types.getBounds(origin) : List.<Type>nil());
1226 bounds.put(InferenceBound.LOWER, List.<Type>nil()); 1230 bounds.put(InferenceBound.LOWER, List.<Type>nil());
1227 bounds.put(InferenceBound.EQ, List.<Type>nil()); 1231 bounds.put(InferenceBound.EQ, List.<Type>nil());
1228 } 1232 }
1229 1233
1230 public String toString() { 1234 public String toString() {

mercurial