mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 22:09:38 +07:00
new inference: lift also unknown vars (IDEA-117530)
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
abstract class Test<Tt> {
|
||||
|
||||
public Map<String, Long> getNumberOfInstancesForEachWord() {
|
||||
return collect(groupingBy(counting()));
|
||||
}
|
||||
|
||||
abstract <R> R collect(Collector<? super Tt, R> collector);
|
||||
abstract <Tg, M> Collector<Tg, M> groupingBy(Collector<? super Tg, Long> downstream);
|
||||
abstract <Tc> Collector<Tc, Long> counting();
|
||||
|
||||
interface Collector<T, R> {}
|
||||
}
|
||||
|
||||
abstract class Test1<Tt> {
|
||||
|
||||
public Map<String, Long> getNumberOfInstancesForEachWord() {
|
||||
return collect(groupingBy(counting()));
|
||||
}
|
||||
|
||||
abstract <R> R collect(Collector<Tt, R> collector);
|
||||
abstract <Tg, M> Collector<Tg, M> groupingBy(Collector<Tg, Long> downstream);
|
||||
abstract <Tc> Collector<Tc, Long> counting();
|
||||
|
||||
interface Collector<T, R> {}
|
||||
}
|
||||
|
||||
abstract class Test2<Tt> {
|
||||
|
||||
public Map<String, Long> getNumberOfInstancesForEachWord() {
|
||||
return collect(groupingBy(counting()));
|
||||
}
|
||||
|
||||
abstract <R> R collect(Collector<Tt, R> collector);
|
||||
abstract <Tg, M> Collector<Tg, M> groupingBy(Collector<? extends Tg, Long> downstream);
|
||||
abstract <Tc> Collector<Tc, Long> counting();
|
||||
|
||||
interface Collector<T, R> {}
|
||||
}
|
||||
Reference in New Issue
Block a user