hannesw@2304: /* hannesw@2304: * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. hannesw@2304: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. hannesw@2304: * hannesw@2304: * This code is free software; you can redistribute it and/or modify it hannesw@2304: * under the terms of the GNU General Public License version 2 only, as hannesw@2304: * published by the Free Software Foundation. hannesw@2304: * hannesw@2304: * This code is distributed in the hope that it will be useful, but WITHOUT hannesw@2304: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or hannesw@2304: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License hannesw@2304: * version 2 for more details (a copy is included in the LICENSE file that hannesw@2304: * accompanied this code). hannesw@2304: * hannesw@2304: * You should have received a copy of the GNU General Public License version hannesw@2304: * 2 along with this work; if not, write to the Free Software Foundation, hannesw@2304: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. hannesw@2304: * hannesw@2304: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA hannesw@2304: * or visit www.oracle.com if you need additional information or have any hannesw@2304: * questions. hannesw@2304: */ hannesw@2304: hannesw@2304: /** hannesw@2304: * JDK-8186646: Nashorn: "duplicate code" assertion when binding a vararg function that just passes arguments along hannesw@2304: * hannesw@2304: * @test hannesw@2304: * @run hannesw@2304: */ hannesw@2304: hannesw@2304: var fn2 = function () {}; hannesw@2304: hannesw@2304: var fn = function () { hannesw@2304: fn2.apply(null, arguments); hannesw@2304: }; hannesw@2304: hannesw@2304: fn(); hannesw@2304: fn.bind(); hannesw@2304: