|
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 */ |
|
8 |
|
9 import java.util.List; |
|
10 |
|
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 } |