1/* 2 * @test /nodynamiccopyright/ 3 * @bug 8075793 4 * @summary Capture variable as an inference lower bound followed by an array write 5 * @compile/fail/ref=CaptureLowerBoundArray.out -XDrawDiagnostics CaptureLowerBoundArray.java 6 * @compile -Xlint:-options -source 7 CaptureLowerBoundArray.java 7 */ 8 9class CaptureLowerBoundArray { 10 11 interface I<T> { 12 T[] getArray(); 13 } 14 15 <T> T[] m(T[] arg) { return null; } 16 17 void test(I<? extends Exception> i) { 18 m(i.getArray())[0] = new Exception(); 19 } 20 21 22} 23