new inference: propagate current substitutors during additional constrains processing (IDEA-118965)

This commit is contained in:
Anna Kozlova
2014-01-30 12:02:16 +04:00
parent 7dc476d4c6
commit 9ef2c46b28
5 changed files with 34 additions and 5 deletions
@@ -0,0 +1,19 @@
import java.util.Map;
import java.util.function.BinaryOperator;
import java.util.function.Function;
import java.util.stream.Collector;
import java.util.stream.Stream;
public class Bug
{
void foo(Stream<Bug> words){
words.collect(toMap(w -> 1, (a, b) -> a + b));
}
public static <T, K, U>
Collector<T, ?, Map<K,U>> toMap(Function<Bug, U> valueMapper,
BinaryOperator<U> mergeFunction) {
return null;
}
}