1 /*
 2  * @test /nodynamiccopyright/
 3  * @bug 8217958
 4  * @summary Trouble assigning/casting to a value array type with parameterized element type
 5  * @compile/fail/ref=GenericArrayTest.out -Xlint:all -Werror -XDrawDiagnostics -XDdev GenericArrayTest.java
 6  */
 7 
 8 public class GenericArrayTest {
 9 
10     public primitive class Value<T> {
11 
12         T t = null;
13 
14         void foo() {
15             Value<T>[] v = new Value[1024];
16             Value<GenericArrayTest>[] vx = new Value[1024];
17             Value<String>[] vs = new Value[1024];
18             v = (Value<T> []) new Value[1024];
19             vx = (Value <GenericArrayTest> [])new Value[1024];
20             vs = (Value <String> []) new Value[1024];
21             vx = vs;
22         }
23     }
24 }