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() { |