Fri, 29 Apr 2011 16:06:28 +0100
6550655: com.sun.tools.javac.code.Symbol$CompletionFailure
Summary: Accessing a non-existing enum constant from an annotation whose class is available results in an internal error
Reviewed-by: jjg
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 }