sundar@1515: /* sundar@1515: * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. sundar@1515: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. sundar@1515: * sundar@1515: * This code is free software; you can redistribute it and/or modify it sundar@1515: * under the terms of the GNU General Public License version 2 only, as sundar@1515: * published by the Free Software Foundation. sundar@1515: * sundar@1515: * This code is distributed in the hope that it will be useful, but WITHOUT sundar@1515: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or sundar@1515: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License sundar@1515: * version 2 for more details (a copy is included in the LICENSE file that sundar@1515: * accompanied this code). sundar@1515: * sundar@1515: * You should have received a copy of the GNU General Public License version sundar@1515: * 2 along with this work; if not, write to the Free Software Foundation, sundar@1515: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. sundar@1515: * sundar@1515: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA sundar@1515: * or visit www.oracle.com if you need additional information or have any sundar@1515: * questions. sundar@1515: */ sundar@1515: sundar@1515: /** sundar@1515: * JDK-8133119: Error message associated with TypeError for call and new should include stringified Node sundar@1515: * sundar@1515: * @test sundar@1515: * @run sundar@1515: */ sundar@1515: sundar@1515: var obj = {} sundar@1515: try { sundar@1515: obj.func(); sundar@1515: } catch (e) { sundar@1515: print(e); sundar@1515: } sundar@1515: sundar@1515: var arr = [33]; sundar@1515: try { sundar@1515: arr[0].func(); sundar@1515: } catch (e) { sundar@1515: print(e); sundar@1515: } sundar@1515: sundar@1515: try { sundar@1515: new obj.func(); sundar@1515: } catch (e) { sundar@1515: print(e); sundar@1515: } sundar@1515: sundar@1515: try { sundar@1515: new arr[0].func(); sundar@1515: } catch (e) { sundar@1515: print(e); sundar@1515: } sundar@1515: sundar@1515: obj.foo = {} sundar@1515: try { sundar@1515: new obj.foo(); sundar@1515: } catch (e) { sundar@1515: print(e); sundar@1515: } sundar@1515: sundar@1515: try { sundar@1515: obj.foo(); sundar@1515: } catch (e) { sundar@1515: print(e); sundar@1515: } sundar@1515: sundar@1515: var v = new java.util.Vector(); sundar@1515: try { sundar@1515: v(); sundar@1515: } catch (e) { sundar@1515: print(e); sundar@1515: } sundar@1515: sundar@1515: try { sundar@1515: new v(); sundar@1515: } catch (e) { sundar@1515: print(e); sundar@1515: }