TypeScript/tests/cases/compiler/downlevelLetConst18.ts
2015-10-27 10:41:21 -07:00

33 lines
414 B
TypeScript

// @target:es5
// @allowUnreachableCode: true
'use strict'
for (let x; ;) {
function foo() { x };
}
for (let x; ;) {
function foo1() { x };
}
for (let x; ;) {
(() => { x })();
}
for (const x = 1; ;) {
(() => { x })();
}
for (let x; ;) {
({ foo() { x }})
}
for (let x; ;) {
({ get foo() { return x } })
}
for (let x; ;) {
({ set foo(v) { x } })
}