mcimadamore@299: /* mcimadamore@299: * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. mcimadamore@299: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. mcimadamore@299: * mcimadamore@299: * This code is free software; you can redistribute it and/or modify it mcimadamore@299: * under the terms of the GNU General Public License version 2 only, as mcimadamore@299: * published by the Free Software Foundation. mcimadamore@299: * mcimadamore@299: * This code is distributed in the hope that it will be useful, but WITHOUT mcimadamore@299: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or mcimadamore@299: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License mcimadamore@299: * version 2 for more details (a copy is included in the LICENSE file that mcimadamore@299: * accompanied this code). mcimadamore@299: * mcimadamore@299: * You should have received a copy of the GNU General Public License version mcimadamore@299: * 2 along with this work; if not, write to the Free Software Foundation, mcimadamore@299: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. mcimadamore@299: * mcimadamore@299: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, mcimadamore@299: * CA 95054 USA or visit www.sun.com if you need additional information or mcimadamore@299: * have any questions. mcimadamore@299: */ mcimadamore@299: mcimadamore@299: /* mcimadamore@299: * @test mcimadamore@299: * @bug 6638712 6795689 mcimadamore@299: * @author mcimadamore mcimadamore@299: * @summary Inference with wildcard types causes selection of inapplicable method mcimadamore@299: * @compile/fail/ref=T6638712e.out -XDrawDiagnostics T6638712e.java mcimadamore@299: */ mcimadamore@299: mcimadamore@299: class T6638712e { mcimadamore@299: mcimadamore@299: static class Foo { mcimadamore@299: Foo m(Foo foo) { return null;} mcimadamore@299: } mcimadamore@299: mcimadamore@299: static class Test { mcimadamore@299: Foo test(Foo foo1, Foo foo2) { mcimadamore@299: return foo1.m(foo2); mcimadamore@299: } mcimadamore@299: } mcimadamore@299: }