author | ysuenaga |
Wed, 30 Mar 2016 21:05:13 +0900 | |
changeset 37218 | c7241bc368bf |
parent 30716 | 1bbdff43424d |
permissions | -rw-r--r-- |
10 | 1 |
/* |
30716
1bbdff43424d
8074408: Group 12: golden files for tests in tools/javac dir
sogoel
parents:
14547
diff
changeset
|
2 |
* @test /nodynamiccopyright/ |
10 | 3 |
* @bug 5077054 |
4 |
* @summary Conditional operator applies assignment conversion |
|
5 |
* @author Tim Hanson, BEA |
|
6 |
* |
|
14547 | 7 |
* @compile Conditional.java |
30716
1bbdff43424d
8074408: Group 12: golden files for tests in tools/javac dir
sogoel
parents:
14547
diff
changeset
|
8 |
* @compile/fail/ref=Conditional.out -XDrawDiagnostics -source 7 Conditional.java |
10 | 9 |
*/ |
10 |
||
11 |
import java.util.*; |
|
12 |
||
13 |
class Conditional { |
|
14 |
void test() { |
|
15 |
String[] sa = null; |
|
16 |
List<String> ls = sa == null ? Arrays.asList(sa) : |
|
17 |
Collections.emptyList(); |
|
18 |
} |
|
19 |
} |