<div dir="ltr">Hello!<div><br></div><div>We've stumbled with the following code sample:</div><div><br></div><div>class Test {<br>    public static boolean isSub(Super<? super Box<?>> next) {<br>        return next instanceof Sub<?>;<br>    }<br><br>    static class Super<T> {}<br><br>    static class Sub<T> extends Super<Box<T>> { }<br><br>    static class Box<T> {}<br>    <br>    public static void main(String[] args) {<br>                System.out.println(isSub(new Sub<>()));<br> }<br>}<br></div><div><br></div><div>javac 21-ea+12-971 reports an error here:</div><div><br></div><div>Test.java:3: error: incompatible types: Super<CAP#1> cannot be converted to Sub<?><br>        return next instanceof Sub<?>;<br>               ^<br>  where CAP#1 is a fresh type-variable:<br>    CAP#1 extends Object super: Box<?> from capture of ? super Box<?><br>1 error<br></div><div><br></div><div>On the other hand, Eclipse compiler compiles this correctly. From my understanding of the specification, this code should be accepted. Could you please take a look?</div><div><br></div><div>Thank you in advance,</div><div>Tagir Valeev.</div></div>