File: blockScopedBindingsReassignedInLoop5.js

package info (click to toggle)
node-typescript 5.0.4%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 459,140 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (28 lines) | stat: -rw-r--r-- 630 bytes parent folder | download | duplicates (7)
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
//// [blockScopedBindingsReassignedInLoop5.ts]
for (let x = 1, y = 2; x < y; ++x, --y) {
    let a = () => x++ + y++;
    if (x == 1) 
        break;
    else 
        y = 5;
}


//// [blockScopedBindingsReassignedInLoop5.js]
var _loop_1 = function (x, y) {
    var a = function () { return x++ + y++; };
    if (x == 1)
        return out_x_1 = x, out_y_1 = y, "break";
    else
        y = 5;
    out_x_1 = x;
    out_y_1 = y;
};
var out_x_1, out_y_1;
for (var x = 1, y = 2; x < y; ++x, --y) {
    var state_1 = _loop_1(x, y);
    x = out_x_1;
    y = out_y_1;
    if (state_1 === "break")
        break;
}