NASHORN-535.js revision 2:da1e581c933b
174462Salfred/*
214123Speter * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
314123Speter * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
414123Speter *
514123Speter * This code is free software; you can redistribute it and/or modify it
614123Speter * under the terms of the GNU General Public License version 2 only, as
714123Speter * published by the Free Software Foundation.
814123Speter *
914123Speter * This code is distributed in the hope that it will be useful, but WITHOUT
1014123Speter * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1114123Speter * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1214123Speter * version 2 for more details (a copy is included in the LICENSE file that
1314123Speter * accompanied this code).
1414123Speter *
1514123Speter * You should have received a copy of the GNU General Public License version
1614123Speter * 2 along with this work; if not, write to the Free Software Foundation,
1714123Speter * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1814123Speter *
1914123Speter * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2014123Speter * or visit www.oracle.com if you need additional information or have any
2114123Speter * questions.
2214123Speter */
2314123Speter
2414123Speter/*
2514123Speter * NASHORN-535 : Property name of an AccessNode is assigned variable symbol.
2614123Speter *
2714123Speter * @test
2814123Speter * @run
2914123Speter */
3014123Speter
3114123Speterfunction Foo() {
3214123Speter  this.a = "a";
3314123Speter  this.b = "b";
34141580Sru}
3514123Speter
36173281Smatteo(function() {
3715096Smppvar foo = new Foo();
3814123Speterdelete foo.b;
3914123Speterprint(foo.b);
4015096Smpp})();
4114123Speter(function() {
4214123Speter"use strict";
4368965Sruvar foo = new Foo();
4474462Salfreddelete foo.b;
4574462Salfredprint(foo.b);
46173281Smatteo})();
47168324Smatteo