mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
testdata for IDEA-115210
This commit is contained in:
+25
@@ -0,0 +1,25 @@
|
||||
import java.util.*;
|
||||
class A {
|
||||
private void foo(Stream<String> a) {
|
||||
Map<String, List<String>> temp = a.collect(groupingBy(Function.<String>identity()));
|
||||
}
|
||||
|
||||
interface Collector<T, A, R> {
|
||||
}
|
||||
|
||||
public static <T, K> Collector<T, ?, Map<K, List<T>>> groupingBy(Function<? super T, ? extends K> classifier) {
|
||||
return null;
|
||||
}
|
||||
|
||||
interface Stream<T> {
|
||||
<R, A> R collect(Collector<? super T, A, R> collector);
|
||||
}
|
||||
|
||||
interface Function<A, B> {
|
||||
B fn(A a);
|
||||
|
||||
static <T> Function<T, T> identity() {
|
||||
return t -> t;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
import java.util.*;
|
||||
class A {
|
||||
private void foo(Stream<String> a) {
|
||||
<selection>a.collect(groupingBy(Function.<String>identity()))</selection>;
|
||||
}
|
||||
|
||||
interface Collector<T, A, R> {
|
||||
}
|
||||
|
||||
public static <T, K> Collector<T, ?, Map<K, List<T>>> groupingBy(Function<? super T, ? extends K> classifier) {
|
||||
return null;
|
||||
}
|
||||
|
||||
interface Stream<T> {
|
||||
<R, A> R collect(Collector<? super T, A, R> collector);
|
||||
}
|
||||
|
||||
interface Function<A, B> {
|
||||
B fn(A a);
|
||||
|
||||
static <T> Function<T, T> identity() {
|
||||
return t -> t;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user