test/tools/javac/generics/typevars/T7148242.java

Thu, 06 Jun 2013 15:33:40 +0100

author
mcimadamore
date
Thu, 06 Jun 2013 15:33:40 +0100
changeset 1811
349160289ba2
parent 1305
9d47f4850714
child 2525
2eb010b6cb22
permissions
-rw-r--r--

8008627: Compiler mishandles three-way return-type-substitutability
Summary: Compiler should not enforce an order in how ambiguous methods should be resolved
Reviewed-by: jjg, vromero

mcimadamore@1216 1 /*
jjh@1305 2 * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
mcimadamore@1216 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
mcimadamore@1216 4 *
mcimadamore@1216 5 * This code is free software; you can redistribute it and/or modify it
mcimadamore@1216 6 * under the terms of the GNU General Public License version 2 only, as
mcimadamore@1216 7 * published by the Free Software Foundation.
mcimadamore@1216 8 *
mcimadamore@1216 9 * This code is distributed in the hope that it will be useful, but WITHOUT
mcimadamore@1216 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
mcimadamore@1216 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
mcimadamore@1216 12 * version 2 for more details (a copy is included in the LICENSE file that
mcimadamore@1216 13 * accompanied this code).
mcimadamore@1216 14 *
mcimadamore@1216 15 * You should have received a copy of the GNU General Public License version
mcimadamore@1216 16 * 2 along with this work; if not, write to the Free Software Foundation,
mcimadamore@1216 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
mcimadamore@1216 18 *
mcimadamore@1216 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
mcimadamore@1216 20 * or visit www.oracle.com if you need additional information or have any
mcimadamore@1216 21 * questions.
mcimadamore@1216 22 */
mcimadamore@1216 23
mcimadamore@1216 24 /*
mcimadamore@1216 25 * @test
mcimadamore@1216 26 * @bug 7148242
mcimadamore@1216 27 * @summary Regression: valid code rejected during generic type well-formedness check
mcimadamore@1216 28 * @compile T7148242.java
mcimadamore@1216 29 */
mcimadamore@1216 30 class T7148242 {
mcimadamore@1216 31 static abstract class A<K, V, I extends Pair<K, V>, I2 extends Pair<V, K>> {
mcimadamore@1216 32 abstract A<V, K, I2, I> test();
mcimadamore@1216 33 }
mcimadamore@1216 34 static class Pair<K, V> { }
mcimadamore@1216 35 }

mercurial