static factory detection for top level method call (IDEA-172566)

This commit is contained in:
Anna Kozlova
2017-05-10 09:14:16 +03:00
parent a2699c7de1
commit d3b899c7a9
6 changed files with 33 additions and 8 deletions
@@ -29,8 +29,7 @@ public class ConcurrentCollectors {
static <T, K, D, M1 extends Map<K, D>> C<T, M1> groupingBy(F<M1> f,
C<T, D> c,
BiConsumer<M1, T> consumer) {
return new CImpl<error descr="Cannot infer arguments"><></error>(f, consumer, <error descr="Incompatible types. Required BiOp<R> but 'arg' was inferred to BiOp<M2>:
no instance(s) of type variable(s) K, V exist so that R conforms to ConcurrentMap<K, V>">arg(c.getOp())</error>);
return new CImpl<error descr="Cannot infer arguments"><></error>(f, consumer, arg(c.getOp()));
}
static <K, V, M2 extends ConcurrentMap<K, V>> BiOp<M2> arg(BiOp<V> op) {