CaptureLowerBoundNeg.java revision 3819:49170d831308
1/*
2 * @test /nodynamiccopyright/
3 * @bug 8039214
4 * @summary Capture variable as an inference variable's lower bound
5 * @compile/fail/ref=CaptureLowerBoundNeg.out -XDrawDiagnostics CaptureLowerBoundNeg.java
6 * @compile -Xlint:-options -source 7 CaptureLowerBoundNeg.java
7 */
8
9public class CaptureLowerBoundNeg {
10
11    static class D<T> {
12        void take(T arg) {}
13        static <T> D<T> make(Class<? extends T> c) { return new D<T>(); }
14    }
15
16    void test(Object o) {
17        D.make(o.getClass()).take(o);
18    }
19
20}
21