Wed, 08 Oct 2014 14:16:40 -0700
Merge
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 */
8 import java.util.List;
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 }