mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
29 lines
603 B
TypeScript
29 lines
603 B
TypeScript
//// [tests/cases/compiler/blockScopedBindingsReassignedInLoop4.ts] ////
|
|
|
|
//// [blockScopedBindingsReassignedInLoop4.ts]
|
|
function f1() {
|
|
for (let x = 1, y = 2; x < y; ++x, --y) {
|
|
let a = () => x++ + y++;
|
|
if (x == 1) {
|
|
return 1;
|
|
}
|
|
else {
|
|
y = 5;
|
|
}
|
|
}
|
|
}
|
|
|
|
//// [blockScopedBindingsReassignedInLoop4.js]
|
|
"use strict";
|
|
function f1() {
|
|
for (let x = 1, y = 2; x < y; ++x, --y) {
|
|
let a = () => x++ + y++;
|
|
if (x == 1) {
|
|
return 1;
|
|
}
|
|
else {
|
|
y = 5;
|
|
}
|
|
}
|
|
}
|