26N/A/*
553N/A * Copyright (c) 2004, 2008, Oracle and/or its affiliates. All rights reserved.
26N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
26N/A *
26N/A * This code is free software; you can redistribute it and/or modify it
26N/A * under the terms of the GNU General Public License version 2 only, as
26N/A * published by the Free Software Foundation.
26N/A *
26N/A * This code is distributed in the hope that it will be useful, but WITHOUT
26N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
26N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
26N/A * version 2 for more details (a copy is included in the LICENSE file that
26N/A * accompanied this code).
26N/A *
26N/A * You should have received a copy of the GNU General Public License version
26N/A * 2 along with this work; if not, write to the Free Software Foundation,
26N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
26N/A *
553N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
553N/A * or visit www.oracle.com if you need additional information or have any
553N/A * questions.
26N/A */
26N/A
26N/A/*
26N/A * @test
26N/A * @bug 6450290
26N/A * @summary Capture of nested wildcards causes type error
26N/A * @author Maurizio Cimadamore
26N/A * @compile/fail T6450290.java
26N/A */
26N/A
26N/Apublic class T6450290 {
26N/A static class Box<X extends Box<?,?>, T extends X> {
26N/A T value;
26N/A Box<X, T> same;
26N/A }
26N/A
26N/A static class A extends Box<A,A> {}
26N/A static class B extends Box<B,B> {}
26N/A public static void main(String[] args) {
26N/A Box<?,?> b = new Box<Box<A,A>,Box<A,A>>();
26N/A b.value.same = new Box<B,B>(); //javac misses this bad assignment
26N/A }
26N/A}