From e2ceb575a23ae205b558002f7db7ff9af0d5aee4 Mon Sep 17 00:00:00 2001 From: "Anna.Kozlova" Date: Wed, 26 Apr 2017 11:20:07 +0200 Subject: [PATCH] testdata on javac issue --- ...turedWildcardNotOpenedDuringInference.java | 23 +++++++++++++++++++ .../lambda/NewLambdaHighlightingTest.java | 1 + 2 files changed, 24 insertions(+) create mode 100644 java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/CapturedWildcardNotOpenedDuringInference.java diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/CapturedWildcardNotOpenedDuringInference.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/CapturedWildcardNotOpenedDuringInference.java new file mode 100644 index 000000000000..b69d4bd0eb65 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/CapturedWildcardNotOpenedDuringInference.java @@ -0,0 +1,23 @@ + +import java.util.List; +import java.util.function.Function; + + +interface Foo { + + Foo map(Function mapper); + + Foo onClose(); +} + +class Bar { + Foo> transform(final Foo foo) { + return foo + .map(v2 -> tuple(v2)) + .onClose(); + } + + static List tuple(T2 v2) { + return null; + } +} \ No newline at end of file diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/NewLambdaHighlightingTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/NewLambdaHighlightingTest.java index b188c8bc809b..a0fa43720372 100644 --- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/NewLambdaHighlightingTest.java +++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/NewLambdaHighlightingTest.java @@ -154,6 +154,7 @@ public class NewLambdaHighlightingTest extends LightDaemonAnalyzerTestCase { public void testInferTypeParametersFromFunctionalInterfaceInputs() { doTest(); } public void testGroundTargetTypeWhenAbstractMethodInSuperclass() { doTest(); } public void testNestedLambdasWithInferenceOfReturnTypeInTheLatestLambda() { doTest(); } + public void testCapturedWildcardNotOpenedDuringInference() { doTest(); } private void doTest() { IdeaTestUtil.setTestVersion(JavaSdkVersion.JDK_1_8, getModule(), getTestRootDisposable());