Thu, 25 Aug 2011 17:18:25 -0700
Added tag jdk8-b02 for changeset b3c059de2a61
1 /*
2 * @test /nodynamiccopyright/
3 * @bug 6993978
4 * @author mcimadamore
5 * @summary ClassCastException occurs in assignment expressions without any heap pollutions
6 * @compile/fail/ref=T6993978neg.out -Xlint:unchecked -Werror -XDrawDiagnostics T6993978neg.java
7 */
9 import java.util.List;
11 class T6993978neg {
12 @SuppressWarnings({"varargs","unchecked"})
13 static <X> void m(X... x) { }
14 static void test(List<String> ls) {
15 m(ls); //compiler should still give unchecked here
16 }
17 }