2007-12-01 00:00:00 +00:00
|
|
|
/*
|
2014-06-05 17:44:38 +00:00
|
|
|
* @test /nodynamiccopyright/
|
2007-12-01 00:00:00 +00:00
|
|
|
* @bug 5014309
|
|
|
|
* @summary REGRESSION: compiler allows cast from Integer[] to int[]
|
|
|
|
* @author gafter
|
|
|
|
*
|
2014-06-05 17:44:38 +00:00
|
|
|
* @compile/fail/ref=BoxedArray.out -XDrawDiagnostics BoxedArray.java
|
2007-12-01 00:00:00 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
public class BoxedArray {
|
|
|
|
int[] a2;
|
|
|
|
void f(Integer[] a1) {
|
|
|
|
a2 = (int[]) a1;
|
|
|
|
}
|
|
|
|
}
|