test/tools/javac/generics/inference/6356673/T6365166.java

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

author
asaha
date
Mon, 26 Oct 2015 13:23:30 -0700
changeset 2999
683b3e7e05a7
parent 554
9d9f26857129
child 2525
2eb010b6cb22
permissions
-rw-r--r--

Added tag jdk8u76-b00 for changeset 10ffafaf5340

mcimadamore@25 1 /*
ohair@554 2 * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
mcimadamore@25 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
mcimadamore@25 4 *
mcimadamore@25 5 * This code is free software; you can redistribute it and/or modify it
mcimadamore@25 6 * under the terms of the GNU General Public License version 2 only, as
mcimadamore@25 7 * published by the Free Software Foundation.
mcimadamore@25 8 *
mcimadamore@25 9 * This code is distributed in the hope that it will be useful, but WITHOUT
mcimadamore@25 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
mcimadamore@25 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
mcimadamore@25 12 * version 2 for more details (a copy is included in the LICENSE file that
mcimadamore@25 13 * accompanied this code).
mcimadamore@25 14 *
mcimadamore@25 15 * You should have received a copy of the GNU General Public License version
mcimadamore@25 16 * 2 along with this work; if not, write to the Free Software Foundation,
mcimadamore@25 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
mcimadamore@25 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@25 22 */
mcimadamore@25 23
mcimadamore@25 24 /**
mcimadamore@25 25 * @test
mcimadamore@25 26 * @bug 6365166
mcimadamore@25 27 * @summary javac (generic) unable to resolve methods
mcimadamore@25 28 * @author Maurizio Cimadamore
mcimadamore@25 29 *
mcimadamore@25 30 * @compile T6365166.java
mcimadamore@25 31 */
mcimadamore@25 32
mcimadamore@25 33 import java.util.*;
mcimadamore@25 34
mcimadamore@25 35 public class T6365166 {
mcimadamore@25 36 static <A> void add(List<? super A> l, List<A> la) {
mcimadamore@25 37 l.addAll(la); //doesn't compile - but it should
mcimadamore@25 38 }
mcimadamore@25 39 }
mcimadamore@25 40

mercurial