Debian Codegraph @

rhino/testsrc/tests/js1_5/Regress/regress-131510-001.js

raw symbols SCIP
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 /*
7 *
8 * Date: 16 Mar 2002
9 * SUMMARY: Shouldn't crash if define |var arguments| inside a function
10 * See http://bugzilla.mozilla.org/show_bug.cgi?id=131510
11 *
12 */
13 //-----------------------------------------------------------------------------
14 var gTestfile = 'regress-131510-001.js';
15 var BUGNUMBER = 131510;
16 var summary = "Shouldn't crash if define |var arguments| inside a function";
17 printBugNumber(BUGNUMBER);
18 printStatus(summary);
19
20
21 function f() {var arguments;}
22 f();
23
24
25 /*
26 * Put same example in function scope instead of global scope
27 */
28 function g() { function f() {var arguments;}; f();};
29 g();
30
31
32 /*
33 * Put these examples in eval scope
34 */
35 var s = 'function f() {var arguments;}; f();';
36 eval(s);
37
38 s = 'function g() { function f() {var arguments;}; f();}; g();';
39 eval(s);
40
41 reportCompare('No Crash', 'No Crash', '');