jdk-24/test/langtools/tools/javac/generics/inference/CaptureLowerBound.java
2022-09-01 16:43:50 +00:00

20 lines
352 B
Java

/*
* @test /nodynamiccopyright/
* @bug 8039214
* @summary Capture variable as an inference variable's lower bound
* @compile CaptureLowerBound.java
*/
public class CaptureLowerBound {
interface I<X1,X2> {}
static class C<T> implements I<T,T> {}
<X> void m(I<? extends X, X> arg) {}
void test(C<?> arg) {
m(arg);
}
}