summaryrefslogtreecommitdiff
path: root/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/mostSpecific/IDEA127584.java
blob: f1222505a70841782f47c1b5fcc4fb0da2322b9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
class Test {
  public static <Tfoo, Vfoo> Future<Vfoo> foo(Future<Tfoo> future, Function<Tfoo, Vfoo> function) {
    return future.map(function);
  }

  // These interfaces inspired by FoundationDB Java client class files
  interface PartialFunction <TP, VP> {
    VP apply(TP t) throws java.lang.Exception;
  }

  interface Function <TF, VF> extends PartialFunction<TF, VF> {
    VF apply(TF t);
  }

  interface PartialFuture <TPP> {
    <VPP> PartialFuture<VPP> map(PartialFunction<TPP, VPP> partialFunction);
  }

  interface Future <TFF> extends PartialFuture<TFF> {
    <VFF> Future<VFF> map(Function<TFF, VFF> function);
  }
}