import java.util.List ;
public class Main {
interface Interface1< T> { }
interface Interface2< T> extends Interface1< T> { }
static class Bound { }
interface BoundedI1< T extends Bound> extends Interface1< T> { }
interface BoundedI2< T extends Bound> extends Interface2< T> { }
public static void main
( String [ ] args
) { test( ( List< BoundedI2<?>> ) null ) ;
test2( ( List< BoundedI2<?>> ) null ) ;
}
public static void test( List<? extends Interface2<? extends Bound>> list) { test2( list) ; }
public static void test2( List<? extends Interface1<? extends Bound>> list) { }
}
aW1wb3J0IGphdmEudXRpbC5MaXN0OwoKcHVibGljIGNsYXNzIE1haW4gewogICAgaW50ZXJmYWNlIEludGVyZmFjZTE8VD4ge30KICAgIGludGVyZmFjZSBJbnRlcmZhY2UyPFQ+IGV4dGVuZHMgSW50ZXJmYWNlMTxUPiB7fQogICAgc3RhdGljIGNsYXNzIEJvdW5kIHt9CiAgICBpbnRlcmZhY2UgQm91bmRlZEkxPFQgZXh0ZW5kcyBCb3VuZD4gZXh0ZW5kcyBJbnRlcmZhY2UxPFQ+IHt9CiAgICBpbnRlcmZhY2UgQm91bmRlZEkyPFQgZXh0ZW5kcyBCb3VuZD4gZXh0ZW5kcyBJbnRlcmZhY2UyPFQ+IHt9CgogICAgcHVibGljIHN0YXRpYyB2b2lkIG1haW4oU3RyaW5nW10gYXJncykgewogICAgICAgIHRlc3QoKExpc3Q8Qm91bmRlZEkyPD8+PikgbnVsbCk7CiAgICAgICAgdGVzdDIoKExpc3Q8Qm91bmRlZEkyPD8+PikgbnVsbCk7CiAgICB9CgogICAgcHVibGljIHN0YXRpYyB2b2lkIHRlc3QoTGlzdDw/IGV4dGVuZHMgSW50ZXJmYWNlMjw/IGV4dGVuZHMgQm91bmQ+PiBsaXN0KSB7IHRlc3QyKGxpc3QpOyB9CgogICAgcHVibGljIHN0YXRpYyB2b2lkIHRlc3QyKExpc3Q8PyBleHRlbmRzIEludGVyZmFjZTE8PyBleHRlbmRzIEJvdW5kPj4gbGlzdCkge30KfQ==
compilation info
Main.java:12: error: method test2 in class Main cannot be applied to given types;
test2((List<BoundedI2<?>>) null);
^
required: List<? extends Interface1<? extends Bound>>
found: List<BoundedI2<?>>
reason: actual argument List<BoundedI2<?>> cannot be converted to List<? extends Interface1<? extends Bound>> by method invocation conversion
1 error
stdout