1103:47147081d5b4 | 1108:b5d0b8effc85 |
---|---|
1 /* | |
2 * @test /nodynamiccopyright/ | |
3 * @bug 7097436 | |
4 * @summary ClassCastException occurs in assignment expressions without any heap pollutions | |
5 * @compile/fail/ref=T7097436.out -Xlint:varargs -Werror -XDrawDiagnostics T7097436.java | |
6 */ | |
7 | |
8 import java.util.List; | |
9 | |
10 class T7097436 { | |
11 @SafeVarargs | |
12 static void m(List<String>... ls) { | |
13 Object o = ls; //warning | |
14 Object[] oArr = ls; //warning | |
15 String s = ls; // no warning | |
16 Integer[] iArr = ls; // no warning | |
17 } | |
18 } |