--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java Thu Mar 19 11:40:07 2015 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java Thu Mar 19 11:40:47 2015 +0000
@@ -873,7 +873,8 @@
@Override
public void apply(UndetVar uv, InferenceContext inferenceContext, Warner warn) {
Infer infer = inferenceContext.infer();
- List<Type> boundList = uv.getBounds(InferenceBound.UPPER);
+ List<Type> boundList = uv.getBounds(InferenceBound.UPPER).stream()
+ .collect(infer.types.closureCollector(true, infer.types::isSameType));
List<Type> boundListTail = boundList.tail;
while (boundList.nonEmpty()) {
List<Type> tmpTail = boundListTail;