forked from chakra-core/ChakraCore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloopinit.js
More file actions
29 lines (25 loc) · 790 Bytes
/
loopinit.js
File metadata and controls
29 lines (25 loc) · 790 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
// Test initialization of let/const outside loop that we will try and box if loop body bails out.
function f1()
{
{
while (Math ^= [1])
{
Math;
}
let x = 0;
{
function foo() { WScript.Echo('foo') }
}
WScript.Echo(x);
}
let y = 1;
WScript.Echo(y);
foo();
}
f1();
f1();
WScript.Echo('pass');