test/tools/javac/generics/wildcards/T6732484.java

Thu, 23 Oct 2008 17:59:16 +0100

author
mcimadamore
date
Thu, 23 Oct 2008 17:59:16 +0100
changeset 154
6508d7e812e1
child 525
9871ce4fd56f
permissions
-rw-r--r--

6732484: Bound error on wildcard code
Summary: Check.checkExtends should cope with captured type-variables
Reviewed-by: jjg

mcimadamore@154 1 /*
mcimadamore@154 2 * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
mcimadamore@154 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
mcimadamore@154 4 *
mcimadamore@154 5 * This code is free software; you can redistribute it and/or modify it
mcimadamore@154 6 * under the terms of the GNU General Public License version 2 only, as
mcimadamore@154 7 * published by the Free Software Foundation.
mcimadamore@154 8 *
mcimadamore@154 9 * This code is distributed in the hope that it will be useful, but WITHOUT
mcimadamore@154 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
mcimadamore@154 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
mcimadamore@154 12 * version 2 for more details (a copy is included in the LICENSE file that
mcimadamore@154 13 * accompanied this code).
mcimadamore@154 14 *
mcimadamore@154 15 * You should have received a copy of the GNU General Public License version
mcimadamore@154 16 * 2 along with this work; if not, write to the Free Software Foundation,
mcimadamore@154 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
mcimadamore@154 18 *
mcimadamore@154 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
mcimadamore@154 20 * CA 95054 USA or visit www.sun.com if you need additional information or
mcimadamore@154 21 * have any questions.
mcimadamore@154 22 */
mcimadamore@154 23
mcimadamore@154 24 /*
mcimadamore@154 25 * @test
mcimadamore@154 26 * @bug 6732484
mcimadamore@154 27 * @summary Bound error on wildcard code
mcimadamore@154 28 * @author Maurizio Cimadamore
mcimadamore@154 29 * @compile T6732484.java
mcimadamore@154 30 */
mcimadamore@154 31
mcimadamore@154 32 class T6732484 {
mcimadamore@154 33 class A<T extends A<T>> {}
mcimadamore@154 34 class B extends A<B> {}
mcimadamore@154 35
mcimadamore@154 36 A<? super B> f;
mcimadamore@154 37 }

mercurial