mcimadamore@2794: /* mcimadamore@2794: * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. mcimadamore@2794: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. mcimadamore@2794: * mcimadamore@2794: * This code is free software; you can redistribute it and/or modify it mcimadamore@2794: * under the terms of the GNU General Public License version 2 only, as mcimadamore@2794: * published by the Free Software Foundation. Oracle designates this mcimadamore@2794: * particular file as subject to the "Classpath" exception as provided mcimadamore@2794: * by Oracle in the LICENSE file that accompanied this code. mcimadamore@2794: * mcimadamore@2794: * This code is distributed in the hope that it will be useful, but WITHOUT mcimadamore@2794: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or mcimadamore@2794: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License mcimadamore@2794: * version 2 for more details (a copy is included in the LICENSE file that mcimadamore@2794: * accompanied this code). mcimadamore@2794: * mcimadamore@2794: * You should have received a copy of the GNU General Public License version mcimadamore@2794: * 2 along with this work; if not, write to the Free Software Foundation, mcimadamore@2794: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. mcimadamore@2794: * mcimadamore@2794: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA mcimadamore@2794: * or visit www.oracle.com if you need additional information or have any mcimadamore@2794: * questions. mcimadamore@2794: */ mcimadamore@2794: mcimadamore@2794: /* mcimadamore@2794: * @test mcimadamore@2794: * @bug 8064803 mcimadamore@2794: * @summary Javac erroneously uses instantiated signatures when merging abstract most-specific methods mcimadamore@2794: */ mcimadamore@2794: public class T8064803 { mcimadamore@2794: interface ParentA { mcimadamore@2794: T process() throws Exception; mcimadamore@2794: } mcimadamore@2794: mcimadamore@2794: interface ParentB { mcimadamore@2794: T process() throws Exception; mcimadamore@2794: } mcimadamore@2794: mcimadamore@2794: interface Child extends ParentA, ParentB { } mcimadamore@2794: mcimadamore@2794: static class ChildImpl implements Child { mcimadamore@2794: @Override mcimadamore@2794: public T process() { mcimadamore@2794: return null; mcimadamore@2794: } mcimadamore@2794: } mcimadamore@2794: mcimadamore@2794: public static void main(String[] args) throws Exception { mcimadamore@2794: Child child = new ChildImpl(); mcimadamore@2794: child.process(); mcimadamore@2794: } mcimadamore@2794: }