Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spread operator in combination with a set is incorrectly transpiled #173

Closed
flekschas opened this issue Nov 30, 2018 · 2 comments
Closed
Labels

Comments

@flekschas
Copy link

The following statement...

console.log([...new Set([1,2,2])]);
// => [1, 2]

...is unfortunately transpiled by Buble the code into:

console.log([].concat( new Set([1,2,3]) ));
// => [Set(3)]

But the statements are functionally not equivalent. I would expect Buble to either handle the spread operator correctly or throw a warning or error.

This is potentially related to #81

@flekschas flekschas changed the title Spread operator in combination a set is producing incorrect transpilation Spread operator in combination with a set is incorrectly transpiled Nov 30, 2018
@adrianheine adrianheine added the bug label Mar 1, 2019
@adrianheine
Copy link
Member

This topic has been discussed somewhat in #81.

@adrianheine
Copy link
Member

Closing this in favor of #131.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants