langtools/test/tools/javac/T8024207/FlowCrashTest.java
author sogoel
Thu, 05 Jun 2014 10:57:10 -0700
changeset 24797 850ebd4d80a7
parent 19940 d6d6e623f0b4
permissions -rw-r--r--
8044072: Group 2: create .out files for OverrideChecks tests in tools/javac dir Reviewed-by: jjg

/*
 * @test  /nodynamiccopyright/
 * @bug 8024207
 * @summary javac crash in Flow$AssignAnalyzer.visitIdent
 * @compile/fail/ref=FlowCrashTest.out -XDrawDiagnostics FlowCrashTest.java
 */

import java.util.*;
import java.util.stream.*;

public class FlowCrashTest {
    static class ViewId { }

    public void crash() {

        Map<ViewId,String> viewToProfile = null;
        new TreeMap<>(viewToProfile.entrySet().stream()
                      .collect(Collectors.toMap((vid, prn) -> prn,
                                                (vid, prn) -> Arrays.asList(vid),
                                                (a, b) -> { a.addAll(b); return a; })));

    }
}