jdk-24/test/langtools/tools/javac/cast/6295056/T6295056.java

17 lines
346 B
Java
Raw Normal View History

2007-12-01 00:00:00 +00:00
/*
* @test /nodynamiccopyright/
2007-12-01 00:00:00 +00:00
* @bug 6295056
* @summary Unchecked cast not reported as unsafe
* @compile/ref=T6295056.out -XDrawDiagnostics -Xlint:unchecked T6295056.java
2007-12-01 00:00:00 +00:00
* @compile T6295056.java
*/
public class T6295056 {
interface Foo {}
interface Bar<X> {}
Object m(Foo f) {
return (Bar<Object>)f;
}
}