2015-02-21 00:05:13 +00:00
|
|
|
/*
|
|
|
|
* @test /nodynamiccopyright/
|
|
|
|
* @bug 8039214
|
|
|
|
* @summary Capture variable as an inference variable's lower bound
|
|
|
|
* @compile/fail/ref=CaptureLowerBoundNeg.out -XDrawDiagnostics CaptureLowerBoundNeg.java
|
2022-09-01 16:43:50 +00:00
|
|
|
*
|
2015-02-21 00:05:13 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
public class CaptureLowerBoundNeg {
|
|
|
|
|
|
|
|
static class D<T> {
|
|
|
|
void take(T arg) {}
|
|
|
|
static <T> D<T> make(Class<? extends T> c) { return new D<T>(); }
|
|
|
|
}
|
|
|
|
|
|
|
|
void test(Object o) {
|
|
|
|
D.make(o.getClass()).take(o);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|