langtools/test/tools/javac/T8024207/FlowCrashTest.java
changeset 19940 d6d6e623f0b4
equal deleted inserted replaced
19939:ab90fbc7b74e 19940:d6d6e623f0b4
       
     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  */
       
     7 
       
     8 import java.util.*;
       
     9 import java.util.stream.*;
       
    10 
       
    11 public class FlowCrashTest {
       
    12     static class ViewId { }
       
    13 
       
    14     public void crash() {
       
    15 
       
    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; })));
       
    21 
       
    22     }
       
    23 }