Duplicate variable declarations with destructuring are partially converted to let/const
nene opened this issue · comments
For example, the below code should not be converted to let/const:
var a = 1;
var {a, b} = createObj();
Lebab understand that a
is a repeated variable, but ignores the fact that b
is declared together with it and attempts to convert it to const
:
var a = 1;
const {a, b} = createObj();