diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA127124comment.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA127124comment.java new file mode 100644 index 000000000000..cb8442e59d12 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA127124comment.java @@ -0,0 +1,30 @@ +import java.util.Collections; +import java.util.List; +import java.util.Optional; +import java.util.function.Function; +import java.util.stream.Collectors; + +class Test { + private static class Thing { + final String val; + public Thing(String val) { + this.val = val; + } + } + + public static Optional> highlights() { + return Optional.of(Collections.singletonList(new Thing("Hello"))) + .map(l -> l + .stream() + .map(t -> t.val + " world!") + .collect(Collectors.toList())); + } + + public static Optional> works() { + return Optional.of(Collections.singletonList(new Thing("Hello"))) + .map(l -> l + .stream() + .map(t -> t.val + " world!") + .collect(Collectors.toList())); + } +} \ 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 807ce9881c22..92eb0daa09f9 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 @@ -109,6 +109,9 @@ public class NewLambdaHighlightingTest extends LightDaemonAnalyzerTestCase { public void testIDEA124190() throws Exception { doTest(); } + public void testIDEA127124comment() throws Exception { + doTest(); + } private void doTest() { doTest(false);