Mon, 25 Mar 2013 16:55:14 -0700
8010521: jdk8 l10n resource file translation update 2
Reviewed-by: naoto, yhuang
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 }