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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
|
//// [blockScopedBindingsReassignedInLoop2.ts]
for (let x = 1, y = 2; x < y; ++x, --y) {
let a = () => x++ + y++;
if (x == 1) {
break;
}
else {
y = 5;
}
}
for (let x = 1, y = 2; x < y; ++x, --y) {
let a = () => x++ + y++;
if (x == 1) {
continue;
}
else {
y = 5;
}
}
loop:
for (let x = 1, y = 2; x < y; ++x, --y) {
let a = () => x++ + y++;
if (x == 1) {
break loop;
}
else {
y = 5;
}
}
loop:
for (let x = 1, y = 2; x < y; ++x, --y) {
let a = () => x++ + y++;
if (x == 1) {
continue loop;
}
else {
y = 5;
}
}
//// [blockScopedBindingsReassignedInLoop2.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;
}
var _loop_2 = function (x, y) {
var a = function () { return x++ + y++; };
if (x == 1) {
return out_x_2 = x, out_y_2 = y, "continue";
}
else {
y = 5;
}
out_x_2 = x;
out_y_2 = y;
};
var out_x_2, out_y_2;
for (var x = 1, y = 2; x < y; ++x, --y) {
_loop_2(x, y);
x = out_x_2;
y = out_y_2;
}
var _loop_3 = function (x, y) {
var a = function () { return x++ + y++; };
if (x == 1) {
return out_x_3 = x, out_y_3 = y, "break-loop";
}
else {
y = 5;
}
out_x_3 = x;
out_y_3 = y;
};
var out_x_3, out_y_3;
loop: for (var x = 1, y = 2; x < y; ++x, --y) {
var state_2 = _loop_3(x, y);
x = out_x_3;
y = out_y_3;
switch (state_2) {
case "break-loop": break loop;
}
}
var _loop_4 = function (x, y) {
var a = function () { return x++ + y++; };
if (x == 1) {
return out_x_4 = x, out_y_4 = y, "continue-loop";
}
else {
y = 5;
}
out_x_4 = x;
out_y_4 = y;
};
var out_x_4, out_y_4;
loop: for (var x = 1, y = 2; x < y; ++x, --y) {
var state_3 = _loop_4(x, y);
x = out_x_4;
y = out_y_4;
switch (state_3) {
case "continue-loop": continue loop;
}
}
|