diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/ReturnTypeApplocabilityIfCapturedWildcardInferred.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/ReturnTypeApplocabilityIfCapturedWildcardInferred.java new file mode 100644 index 000000000000..f4acb9d6db14 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/ReturnTypeApplocabilityIfCapturedWildcardInferred.java @@ -0,0 +1,9 @@ +import java.util.Map.Entry; +import java.util.function.Function; + +class Test { + + { + Function, String> getKey = Entry::getKey; + } +} \ No newline at end of file diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/NewMethodRefHighlightingTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/NewMethodRefHighlightingTest.java index 59624a3099fc..d02a0801b4ec 100644 --- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/NewMethodRefHighlightingTest.java +++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/NewMethodRefHighlightingTest.java @@ -362,6 +362,10 @@ public class NewMethodRefHighlightingTest extends LightDaemonAnalyzerTestCase { doTest(); } + public void testReturnTypeApplocabilityIfCapturedWildcardInferred() throws Exception { + doTest(); + } + private void doTest() { doTest(false); }