You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
+ Bail out for replacement of single use variable inside a function
TODO: maybe a more intelligent approach to replace - for ex,
// from
const [a] = b; return a;
const {a} = b; return a;
// to
return b[0];
return b.a;
+ (Close#151)
+ Bail out for replacement of single use variable inside a function
TODO: maybe a more intelligent approach to replace - for ex,
// from
const [a] = b; return a;
const {a} = b; return a;
// to
return b[0];
return b.a;
+ (Close#151)
Babili seems to be misinterpreting array destructuring inside function bodies:
Input
Output
REPL
As you can see, it acts as if there's no destructuring going on at all.
It fails if you try to get more than one item:
Input
Error message
REPL
On the other hand, destructuring outside functions seems to be fine. Object destructuring also worked for me.
The text was updated successfully, but these errors were encountered: