|
Java example source code file (T6993978neg.java)
The T6993978neg.java Java example source code
/*
* @test /nodynamiccopyright/
* @bug 6993978
* @author mcimadamore
* @summary ClassCastException occurs in assignment expressions without any heap pollutions
* @compile/fail/ref=T6993978neg.out -Xlint:unchecked -Werror -XDrawDiagnostics T6993978neg.java
*/
import java.util.List;
class T6993978neg {
@SuppressWarnings({"varargs","unchecked"})
static <X> void m(X... x) { }
static void test(List<String> ls) {
m(ls); //compiler should still give unchecked here
}
}
Other Java examples (source code examples)Here is a short list of links related to this Java T6993978neg.java source code file: |
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.