JDK-8031317.js revision 877:cf4d2252d444
1162509Sru/*
2107590Sobrien * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
3107590Sobrien * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4162509Sru *
5107590Sobrien * This code is free software; you can redistribute it and/or modify it
6107590Sobrien * under the terms of the GNU General Public License version 2 only, as
7107590Sobrien * published by the Free Software Foundation.
8107590Sobrien *
9107590Sobrien * This code is distributed in the hope that it will be useful, but WITHOUT
10107590Sobrien * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11107590Sobrien * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12107590Sobrien * version 2 for more details (a copy is included in the LICENSE file that
13107590Sobrien * accompanied this code).
14107590Sobrien *
15107590Sobrien * You should have received a copy of the GNU General Public License version
16107590Sobrien * 2 along with this work; if not, write to the Free Software Foundation,
17107590Sobrien * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18107590Sobrien *
19107590Sobrien * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20107590Sobrien * or visit www.oracle.com if you need additional information or have any
21107590Sobrien * questions.
22107590Sobrien */
23107590Sobrien
24107590Sobrien/**
25107590Sobrien * JDK-8031317: SyntaxError when property setter has no parameter
26107590Sobrien *
27107590Sobrien * @test
28107590Sobrien * @run
29162509Sru */
30162509Sru
31162509Sruvar obj = {
32107590Sobrien  get toto() {
33107590Sobrien      print("in getter for 'toto'");
34107590Sobrien  },
35107590Sobrien  set toto() {
36107590Sobrien      print("in setter for 'toto'");
37107590Sobrien  }
38107590Sobrien}
39107590Sobrien
40107590Sobrienobj.toto;
41107590Sobrienobj.toto = 344;
42107590Sobrien