Closed
Description
Hi, this is probably only a minor/cosmetic issue, but while trying the code in https://bugzilla.mozilla.org/show_bug.cgi?id=1069480, I found that the Typescript Compiler does not detect that a variable is used before its initialization in a for-of loop with object destructuring using a computed property name.
TypeScript Version:
master (a75a02c)
Code (Playground)
"use strict";
// 1:
for (let {[a]: a} of [{ }]) continue;
// 2:
for (let {[a]: a} = { }; false; ) continue;
// 3:
let {[b]: b} = { };
Expected behavior:
For 1), 2) and 3) the error "Block-scoped variable used before its declaration" should be reported.
Actual behavior:
No error reported for 1), correct errors reported for 2) and 3).
Thanks!