1/*
2 * @test /nodynamiccopyright/
3 * @bug 6450290
4 * @summary Capture of nested wildcards causes type error
5 * @author Maurizio Cimadamore
6 * @compile/fail/ref=T6450290.out -XDrawDiagnostics  T6450290.java
7 */
8
9public class T6450290 {
10    static class Box<X extends Box<?,?>, T extends X> {
11        T value;
12        Box<X, T> same;
13    }
14
15    static class A extends Box<A,A> {}
16    static class B extends Box<B,B> {}
17    public static void main(String[] args) {
18        Box<?,?> b = new Box<Box<A,A>,Box<A,A>>();
19        b.value.same = new Box<B,B>(); //javac misses this bad assignment
20    }
21}
22