test/tools/javac/generics/inference/8055963/T8055963.java

Mon, 26 Oct 2015 13:23:30 -0700

author
asaha
date
Mon, 26 Oct 2015 13:23:30 -0700
changeset 2999
683b3e7e05a7
parent 2804
bacd3cbb4e5e
permissions
-rw-r--r--

Added tag jdk8u76-b00 for changeset 10ffafaf5340

mcimadamore@2804 1 /*
mcimadamore@2804 2 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
mcimadamore@2804 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
mcimadamore@2804 4 *
mcimadamore@2804 5 * This code is free software; you can redistribute it and/or modify it
mcimadamore@2804 6 * under the terms of the GNU General Public License version 2 only, as
mcimadamore@2804 7 * published by the Free Software Foundation. Oracle designates this
mcimadamore@2804 8 * particular file as subject to the "Classpath" exception as provided
mcimadamore@2804 9 * by Oracle in the LICENSE file that accompanied this code.
mcimadamore@2804 10 *
mcimadamore@2804 11 * This code is distributed in the hope that it will be useful, but WITHOUT
mcimadamore@2804 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
mcimadamore@2804 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
mcimadamore@2804 14 * version 2 for more details (a copy is included in the LICENSE file that
mcimadamore@2804 15 * accompanied this code).
mcimadamore@2804 16 *
mcimadamore@2804 17 * You should have received a copy of the GNU General Public License version
mcimadamore@2804 18 * 2 along with this work; if not, write to the Free Software Foundation,
mcimadamore@2804 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
mcimadamore@2804 20 *
mcimadamore@2804 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
mcimadamore@2804 22 * or visit www.oracle.com if you need additional information or have any
mcimadamore@2804 23 * questions.
mcimadamore@2804 24 */
mcimadamore@2804 25
mcimadamore@2804 26 /**
mcimadamore@2804 27 * @test
mcimadamore@2804 28 * @bug 8055963
mcimadamore@2804 29 * @summary Inference failure with nested invocation
mcimadamore@2804 30 * @compile T8055963.java
mcimadamore@2804 31 */
mcimadamore@2804 32 class T8055963 {
mcimadamore@2804 33
mcimadamore@2804 34 static class C<T> {}
mcimadamore@2804 35
mcimadamore@2804 36 <T> T choose(T first, T second) { return null; }
mcimadamore@2804 37
mcimadamore@2804 38 void test() {
mcimadamore@2804 39 C<String> cs = choose(new C<String>(), new C<>());
mcimadamore@2804 40 }
mcimadamore@2804 41 }

mercurial