|
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 var BUGNUMBER = 452498; |
|
8 var summary = 'TM: upvar2 regression tests'; |
|
9 var actual = ''; |
|
10 var expect = ''; |
|
11 |
|
12 |
|
13 //----------------------------------------------------------------------------- |
|
14 test(); |
|
15 //----------------------------------------------------------------------------- |
|
16 |
|
17 function test() |
|
18 { |
|
19 enterFunc ('test'); |
|
20 printBugNumber(BUGNUMBER); |
|
21 printStatus (summary); |
|
22 |
|
23 // ===== |
|
24 |
|
25 foo = "" + new Function("while(\u3056){let \u3056 = x}"); |
|
26 |
|
27 // ===== |
|
28 |
|
29 function a(){ let c; eval("let c, y"); } |
|
30 a(); |
|
31 |
|
32 // ===== |
|
33 |
|
34 try |
|
35 { |
|
36 {x: 1e+81 ? c : arguments} |
|
37 } |
|
38 catch(ex) |
|
39 { |
|
40 } |
|
41 |
|
42 // ===== |
|
43 |
|
44 (function(q){return q;} for each (\u3056 in [])) |
|
45 |
|
46 // ===== |
|
47 |
|
48 for( |
|
49 const NaN; |
|
50 this.__defineSetter__("x4", function(){}); |
|
51 (eval("", (p={})))) let ({} = (((x ))(function ([]) {})), x1) y; |
|
52 |
|
53 // ===== |
|
54 |
|
55 function f(){ var c; eval("{var c = NaN, c;}"); } |
|
56 f(); |
|
57 |
|
58 // ===== |
|
59 try |
|
60 { |
|
61 eval( |
|
62 ' x\n' + |
|
63 ' let(x) {\n' + |
|
64 ' var x\n' |
|
65 ); |
|
66 } |
|
67 catch(ex) |
|
68 { |
|
69 } |
|
70 |
|
71 // ===== |
|
72 |
|
73 reportCompare(expect, actual, summary); |
|
74 |
|
75 exitFunc ('test'); |
|
76 } |