summaryrefslogtreecommitdiff
path: root/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/mostSpecific/IDEA127584.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/mostSpecific/IDEA127584.java')
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/mostSpecific/IDEA127584.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/mostSpecific/IDEA127584.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/mostSpecific/IDEA127584.java
new file mode 100644
index 000000000000..f1222505a708
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/mostSpecific/IDEA127584.java
@@ -0,0 +1,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);
+ }
+}