langtools/test/tools/javac/conditional/Conditional.java
author ysuenaga
Wed, 30 Mar 2016 21:05:13 +0900
changeset 37218 c7241bc368bf
parent 30716 1bbdff43424d
permissions -rw-r--r--
8151674: STW phases at Concurrent GC should count in PerfCounter Reviewed-by: jmasa, sla, tschatzl

/*
 * @test /nodynamiccopyright/
 * @bug 5077054
 * @summary Conditional operator applies assignment conversion
 * @author Tim Hanson, BEA
 *
 * @compile Conditional.java
 * @compile/fail/ref=Conditional.out -XDrawDiagnostics  -source 7 Conditional.java
 */

import java.util.*;

class Conditional {
    void test() {
        String[] sa = null;
        List<String> ls = sa == null ? Arrays.asList(sa) :
            Collections.emptyList();
    }
}