1/*
2 * @test /nodynamiccopyright/
3 * @bug 5014309
4 * @summary REGRESSION: compiler allows cast from Integer[] to int[]
5 * @author gafter
6 *
7 * @compile/fail/ref=BoxedArray.out -XDrawDiagnostics  BoxedArray.java
8 */
9
10public class BoxedArray {
11    int[] a2;
12    void f(Integer[] a1) {
13        a2 = (int[]) a1;
14    }
15}
16