Daniel Tschinder 28853bf190 Fix for-await printing (#5322)
Only the first for-await was correctly printed all subsequent for-await statements
where printed as for-of as the variable op was changed inside the buildForXStatement
2017-02-15 17:43:06 -05:00

29 lines
564 B
JavaScript

// ForXStatement
for (var _ref of []) {
var { a } = _ref,
b = babelHelpers.objectWithoutProperties(_ref, ["a"]);
}
for (var _ref2 of []) {
var { a } = _ref2,
b = babelHelpers.objectWithoutProperties(_ref2, ["a"]);
}
async function a() {
for await (var _ref3 of []) {
var { a } = _ref3,
b = babelHelpers.objectWithoutProperties(_ref3, ["a"]);
}
}
// skip
for ({ a } in {}) {}
for ({ a } of []) {}
async function a() {
for await ({ a } of []) {}
}
for (a in {}) {}
for (a of []) {}
async function a() {
for await (a of []) {}
}