dotpropname.js revision 2:da1e581c933b
1141104Sharti/* 294589Sobrien * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. 394589Sobrien * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 45814Sjkh * 51590Srgrimes * This code is free software; you can redistribute it and/or modify it 61590Srgrimes * under the terms of the GNU General Public License version 2 only, as 71590Srgrimes * published by the Free Software Foundation. 81590Srgrimes * 91590Srgrimes * This code is distributed in the hope that it will be useful, but WITHOUT 101590Srgrimes * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 111590Srgrimes * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 121590Srgrimes * version 2 for more details (a copy is included in the LICENSE file that 131590Srgrimes * accompanied this code). 141590Srgrimes * 151590Srgrimes * You should have received a copy of the GNU General Public License version 161590Srgrimes * 2 along with this work; if not, write to the Free Software Foundation, 171590Srgrimes * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 181590Srgrimes * 191590Srgrimes * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 201590Srgrimes * or visit www.oracle.com if you need additional information or have any 211590Srgrimes * questions. 221590Srgrimes */ 231590Srgrimes 241590Srgrimes/** 251590Srgrimes * "." is property name should be allowed. 261590Srgrimes * 271590Srgrimes * @test 281590Srgrimes * @run 291590Srgrimes */ 301590Srgrimes 311590Srgrimesvar obj = {}; 321590Srgrimesobj["abc.yyy"] = function () { 331590Srgrimes print("abc.yyy called"); 341590Srgrimes}; 351590Srgrimes 361590Srgrimesobj["abc.yyy"](); 371590Srgrimes 381590Srgrimesobj["abc.xyz"] = "hello"; 3994589Sobrienprint(obj["abc.xyz"]); 4050477Speter 411590Srgrimes