1 /*
 2  * @test /nodynamiccopyright/
 3  * @bug 8075793
 4  * @summary Capture variable as an inference lower bound followed by a member reference
 5  * @compile/fail/ref=CaptureLowerBoundDeref.out -XDrawDiagnostics CaptureLowerBoundDeref.java
 6  * @compile -Xlint:-options -source 7 CaptureLowerBoundDeref.java
 7  */
 8 
 9 class CaptureLowerBoundDeref {
10 
11     interface Wrapper<T> {
12         I<T> get();
13     }
14 
15     interface I<T> {}
16 
17     interface K<T> { void take(T arg); }
18 
19     <T> K<T> m(I<? extends T> arg) { return null; }
20 
21     void test(Wrapper<?> w) {
22         m(w.get()).take(new Object() {});
23     }
24 }