test/tools/javac/generics/6729401/T6729401.java

Fri, 09 Apr 2010 15:39:39 -0700

author
jjg
date
Fri, 09 Apr 2010 15:39:39 -0700
changeset 535
96072ad00783
parent 229
03bcd66bd8e7
child 554
9d9f26857129
permissions
-rw-r--r--

6942649: add hidden option to identify location and version of javac classes
Reviewed-by: darcy

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

mercurial