TypeScript/tests/cases/compiler/downlevelLetConst18.ts

33 lines
414 B
TypeScript
Raw Normal View History

2015-02-27 01:53:25 +01:00
// @target:es5
// @allowUnreachableCode: true
2015-02-27 01:53:25 +01:00
'use strict'
for (let x; ;) {
function foo() { x };
}
for (let x; ;) {
2015-10-27 18:41:21 +01:00
function foo1() { x };
2015-02-27 01:53:25 +01:00
}
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 } })
}