testdata for IDEA-133920
authorAnna Kozlova <anna.kozlova@jetbrains.com>
Thu, 3 Sep 2015 13:51:35 +0000 (16:51 +0300)
committerAnna Kozlova <anna.kozlova@jetbrains.com>
Thu, 3 Sep 2015 14:22:29 +0000 (17:22 +0300)
java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA133920.java [new file with mode: 0644]
java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/NewLambdaHighlightingTest.java

diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA133920.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newLambda/IDEA133920.java
new file mode 100644 (file)
index 0000000..9697753
--- /dev/null
@@ -0,0 +1,40 @@
+
+import java.util.HashMap;
+import java.util.Map;
+
+import static java.util.Collections.singletonMap;
+
+class Main {
+
+  public static void main(String[] args) {
+    final Builder<Object, Object> builder = new Builder<>();
+
+    String appName = "asdf";
+    Map query = builder
+      .put("size", 0)
+      .put("query", singletonMap("bool",
+                                 singletonMap("must",
+                                              of(singletonMap("term", singletonMap("type.raw", appName)),
+                                                 singletonMap("range", singletonMap("@timestamp", of("gt", "2014-12-01")))))))
+      .build();
+
+    System.out.println(query);
+  }
+
+
+  public static <K, V> Map<K, V> of(K k1, V v1) {
+    return null;
+  }
+
+
+  static class Builder<K, V> {
+
+    public Builder<K, V> put(K key, V value) {
+      return this;
+    }
+
+    public HashMap<K, V> build() {
+      return null;
+    }
+  }
+}
\ No newline at end of file
index a8d40a27ada201a29284ee3da13055c28e4cb423..c210f57029ae4f1322dfe5b99a4cc019bc565192 100644 (file)
@@ -220,6 +220,10 @@ public class NewLambdaHighlightingTest extends LightDaemonAnalyzerTestCase {
     doTest();
   }
 
+  public void testIDEA133920() throws Exception {
+    doTest();
+  }
+
   private void doTest() {
     doTest(false);
   }