sweet-js / sweet-core

Sweeten your JavaScript.
https://www.sweetjs.org
BSD 2-Clause "Simplified" License
4.58k stars 208 forks source link

object destructuring shorthand broken for hygiene #733

Closed michaelficarra closed 7 years ago

michaelficarra commented 7 years ago
let { a } = b;

gets compiled to

let { a_316 } = b;

but should instead be

let { a: a_316 } = b;

This leads to some very confusing differences between using the shorthand notation and the longhand notation. ðŸ˜