vromero@2025: /* vromero@2025: * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. vromero@2025: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. vromero@2025: * vromero@2025: * This code is free software; you can redistribute it and/or modify it vromero@2025: * under the terms of the GNU General Public License version 2 only, as vromero@2025: * published by the Free Software Foundation. vromero@2025: * vromero@2025: * This code is distributed in the hope that it will be useful, but WITHOUT vromero@2025: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or vromero@2025: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License vromero@2025: * version 2 for more details (a copy is included in the LICENSE file that vromero@2025: * accompanied this code). vromero@2025: * vromero@2025: * You should have received a copy of the GNU General Public License version vromero@2025: * 2 along with this work; if not, write to the Free Software Foundation, vromero@2025: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. vromero@2025: * vromero@2025: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA vromero@2025: * or visit www.oracle.com if you need additional information or have any vromero@2025: * questions. vromero@2025: */ vromero@2025: vromero@2025: /* vromero@2025: * @test vromero@2025: * @bug 8023558 vromero@2025: * @summary Javac creates invalid bootstrap methods for complex lambda/methodref case vromero@2025: */ vromero@2025: public class T8023558a { vromero@2025: interface SAM { vromero@2025: T get(); vromero@2025: } vromero@2025: vromero@2025: public static void main(String[] args) { vromero@2025: SAM sam = new SAM() { public SAM get() { return null; } }; vromero@2025: SAM temp = sam.get()::get; vromero@2025: } vromero@2025: }