hannesw@1393: /* hannesw@1393: * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. hannesw@1393: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. hannesw@1393: * hannesw@1393: * This code is free software; you can redistribute it and/or modify it hannesw@1393: * under the terms of the GNU General Public License version 2 only, as hannesw@1393: * published by the Free Software Foundation. hannesw@1393: * hannesw@1393: * This code is distributed in the hope that it will be useful, but WITHOUT hannesw@1393: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or hannesw@1393: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License hannesw@1393: * version 2 for more details (a copy is included in the LICENSE file that hannesw@1393: * accompanied this code). hannesw@1393: * hannesw@1393: * You should have received a copy of the GNU General Public License version hannesw@1393: * 2 along with this work; if not, write to the Free Software Foundation, hannesw@1393: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. hannesw@1393: * hannesw@1393: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA hannesw@1393: * or visit www.oracle.com if you need additional information or have any hannesw@1393: * questions. hannesw@1393: */ hannesw@1393: hannesw@1393: /** hannesw@1393: * JDK-8066220: Fuzzing bug: MethodHandle bug (Object,Object) != (boolean)Object hannesw@1393: * hannesw@1393: * @test hannesw@1393: * @run hannesw@1393: */ hannesw@1393: hannesw@1393: hannesw@1393: function f() {} hannesw@1393: // Call f with primitive this first, then as constructor hannesw@1393: f.call(1); hannesw@1393: new f(); hannesw@1393: hannesw@1393: // Same as above in strict mode hannesw@1393: eval('"use strict"; function e() { print(typeof this); } e.call(1); new e();');