2d18dda3f2
Reviewed-by: vromero
23 lines
458 B
Java
23 lines
458 B
Java
/*
|
|
* @test /nodynamiccopyright/
|
|
* @bug 8075793
|
|
* @summary Capture variable as an inference lower bound followed by an array write
|
|
* @compile/fail/ref=CaptureLowerBoundArray.out -XDrawDiagnostics CaptureLowerBoundArray.java
|
|
*
|
|
*/
|
|
|
|
class CaptureLowerBoundArray {
|
|
|
|
interface I<T> {
|
|
T[] getArray();
|
|
}
|
|
|
|
<T> T[] m(T[] arg) { return null; }
|
|
|
|
void test(I<? extends Exception> i) {
|
|
m(i.getArray())[0] = new Exception();
|
|
}
|
|
|
|
|
|
}
|