Debian Codegraph @

rhino/testsrc/tests/js1_8_1/regress/regress-452498-123.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 var gTestfile = 'regress-452498-123.js';
7 //-----------------------------------------------------------------------------
8 var BUGNUMBER = 452498;
9 var summary = 'TM: upvar2 regression tests';
10 var actual = '';
11 var expect = '';
12
13
14 //-----------------------------------------------------------------------------
15 test();
16 //-----------------------------------------------------------------------------
17
18 function test()
19 {
20 enterFunc ('test');
21 printBugNumber(BUGNUMBER);
22 printStatus (summary);
23
24
25 // ------- Comment #123 From Gary Kwong [:nth10sd]
26
27 // Does not require -j:
28 // =====
29 try
30 {
31 eval('y = (function (){y} for (x in []);');
32 }
33 catch(ex)
34 {
35 }
36
37 // Assertion failure: !(pn->pn_dflags & flag), at ../jsparse.h:651
38 // =====
39 (function(){for(var x = arguments in []){} function x(){}})();
40
41 // Assertion failure: dn->pn_defn, at ../jsemit.cpp:1873
42 // =====
43
44
45 // Requires -j:
46 // =====
47 (function(){ eval("for (x in ['', {}, '', {}]) { this; }" )})();
48
49 // Assertion failure: fp->thisp == JSVAL_TO_OBJECT(fp->argv[-1]), at ../jstracer.cpp:4172
50 // =====
51 for each (let x in ['', '', '']) { (new function(){} )}
52
53 // Assertion failure: scope->object == ctor, at ../jsbuiltins.cpp:236
54 // Opt crash [@ js_FastNewObject] near null
55 // =====
56
57 reportCompare(expect, actual, summary);
58
59 exitFunc ('test');
60 }