aoqi@0: /* aoqi@0: * @test /nodynamiccopyright/ aoqi@0: * @bug 6993978 aoqi@0: * @author mcimadamore aoqi@0: * @summary ClassCastException occurs in assignment expressions without any heap pollutions aoqi@0: * @compile/fail/ref=T6993978neg.out -Xlint:unchecked -Werror -XDrawDiagnostics T6993978neg.java aoqi@0: */ aoqi@0: aoqi@0: import java.util.List; aoqi@0: aoqi@0: class T6993978neg { aoqi@0: @SuppressWarnings({"varargs","unchecked"}) aoqi@0: static void m(X... x) { } aoqi@0: static void test(List ls) { aoqi@0: m(ls); //compiler should still give unchecked here aoqi@0: } aoqi@0: }