mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
32 lines
516 B
TypeScript
32 lines
516 B
TypeScript
//// [tests/cases/compiler/capturedLetConstInLoop11_ES6.ts] ////
|
|
|
|
//// [capturedLetConstInLoop11_ES6.ts]
|
|
for (;;) {
|
|
let x = 1;
|
|
() => x;
|
|
}
|
|
|
|
function foo() {
|
|
for (;;) {
|
|
const a = 0;
|
|
switch(a) {
|
|
case 0: return () => a;
|
|
}
|
|
}
|
|
}
|
|
|
|
//// [capturedLetConstInLoop11_ES6.js]
|
|
"use strict";
|
|
for (;;) {
|
|
let x = 1;
|
|
() => x;
|
|
}
|
|
function foo() {
|
|
for (;;) {
|
|
const a = 0;
|
|
switch (a) {
|
|
case 0: return () => a;
|
|
}
|
|
}
|
|
}
|