test/tools/javac/T8024207/FlowCrashTest.java

Wed, 13 Aug 2014 14:50:00 -0700

author
katleman
date
Wed, 13 Aug 2014 14:50:00 -0700
changeset 2549
0b6cc4ea670f
parent 0
959103a6100f
permissions
-rw-r--r--

Added tag jdk8u40-b01 for changeset bf89a471779d

     1 /*
     2  * @test  /nodynamiccopyright/
     3  * @bug 8024207
     4  * @summary javac crash in Flow$AssignAnalyzer.visitIdent
     5  * @compile/fail/ref=FlowCrashTest.out -XDrawDiagnostics FlowCrashTest.java
     6  */
     8 import java.util.*;
     9 import java.util.stream.*;
    11 public class FlowCrashTest {
    12     static class ViewId { }
    14     public void crash() {
    16         Map<ViewId,String> viewToProfile = null;
    17         new TreeMap<>(viewToProfile.entrySet().stream()
    18                       .collect(Collectors.toMap((vid, prn) -> prn,
    19                                                 (vid, prn) -> Arrays.asList(vid),
    20                                                 (a, b) -> { a.addAll(b); return a; })));
    22     }
    23 }

mercurial