invalid_lvalue.js revision 6:5a1b0714df0e
1283282Sjhb/*
2283282Sjhb * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
3283282Sjhb * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4283282Sjhb *
5283282Sjhb * This code is free software; you can redistribute it and/or modify it
6283282Sjhb * under the terms of the GNU General Public License version 2 only, as
7283282Sjhb * published by the Free Software Foundation.
8283282Sjhb *
9283282Sjhb * This code is distributed in the hope that it will be useful, but WITHOUT
10283282Sjhb * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11283282Sjhb * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12283282Sjhb * version 2 for more details (a copy is included in the LICENSE file that
13283282Sjhb * accompanied this code).
14283282Sjhb *
15283282Sjhb * You should have received a copy of the GNU General Public License version
16283282Sjhb * 2 along with this work; if not, write to the Free Software Foundation,
17283282Sjhb * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18283282Sjhb *
19283282Sjhb * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20283282Sjhb * or visit www.oracle.com if you need additional information or have any
21283282Sjhb * questions.
22283282Sjhb */
23283282Sjhb
24283282Sjhb/**
25283282Sjhb * Early error reporting.
26283282Sjhb *
27283282Sjhb * Attempts to call PutValue on any value for which an early determination can
28283282Sjhb * be made that the value is not a Reference (for example, executing the
29283282Sjhb * assignment statement 3=4).
30315949Sbadger *
31315949Sbadger * @test/compile-error
32315949Sbadger */
33315949Sbadger
34315963Sbadgerprint(__FILE__ + " @" + __LINE__);
35283282Sjhb
36315949Sbadger3 = 4;
37315949Sbadger2 + 44 = 3;
38289780Sjhbx * y = 33;
39287604Sjhbx / y = 23;
40287604Sjhbx++ /= 33
41283282Sjhb--y *= 3;
42283282Sjhb
43315949Sbadger