Fri, 02 Nov 2012 14:35:57 -0700
7169362: JDK8: Write compiler tests for repeating annotations for JDK8
Reviewed-by: darcy, jjg
Contributed-by: sonali.goel@oracle.com
mcimadamore@212 | 1 | /* |
ohair@554 | 2 | * Copyright (c) 2008, 2009, Oracle and/or its affiliates. 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 | * |
ohair@554 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
ohair@554 | 20 | * or visit www.oracle.com if you need additional information or have any |
ohair@554 | 21 | * 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 | } |