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
I did a search and didn't see anything about this (it doesn't appear to have been brought up in #870), but independent splats in array destructuring assignments seem to have a behavior that's inconsistent with their named cousins:
[a, ..., z] = [1] # a = 1; z = 1
[a, yada..., z] = [1] # a = 1; z = undefined
The latter matches the es6 proposal and is what I expect, while the former feels like a bug.
The text was updated successfully, but these errors were encountered:
This is still the case in CS2 now that destructuring compiles to ES syntax. I’m not sure it’s a bug, exactly, and I wonder about the consequences of changing this behavior now. A pull request would be welcome.
I did a search and didn't see anything about this (it doesn't appear to have been brought up in #870), but independent splats in array destructuring assignments seem to have a behavior that's inconsistent with their named cousins:
The latter matches the es6 proposal and is what I expect, while the former feels like a bug.
The text was updated successfully, but these errors were encountered: