We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://buble.surge.sh/#function%20foobar(a%2C%20b)%20%7B%0A%20%20return%20%7B%0A%20%20%20%20foo%3A%20%5Ba%2C%20b%5D%2C%0A%20%20%20%20bar%3A%20%5Bb%2C%20a%5D%2C%0A%20%20%7D%3B%0A%7D%0A%0Afunction%20foo()%20%7B%0A%20%20%09const%20res%20%3D%20%7B%0A%20%20%20%20%09foo%3A%20%5B%5D%2C%0A%20%20%20%20%20%20%09bar%3A%20%5B%5D%2C%0A%20%20%20%20%7D%0A%20%20%20%20const%20r%20%3D%20foobar(1%2C%202)%0A%20%20%20%20res.foo.push(...r.foo)%0A%20%20%20%20res.bar.push(...r.bar)%0A%20%20%09return%20res%0A%7D%0A
Original code works, compiled code fails with foobar(...) is not a function.
foobar(...) is not a function
This is because lack of semicolons makes the resulting code be executed like this:
var r = foobar(1, 2)(ref = res.foo).push.apply(ref, r.foo)
while it should be like this
var r = foobar(1, 2); (ref = res.foo).push.apply(ref, r.foo)
The text was updated successfully, but these errors were encountered:
Yep, that's a bug — thanks for reporting! Minimal repro: https://buble.surge.sh/#a()%0Ab.c.d(...e)
Sorry, something went wrong.
Workaround bublejs/buble#210 :(
346d30c
No branches or pull requests
https://buble.surge.sh/#function%20foobar(a%2C%20b)%20%7B%0A%20%20return%20%7B%0A%20%20%20%20foo%3A%20%5Ba%2C%20b%5D%2C%0A%20%20%20%20bar%3A%20%5Bb%2C%20a%5D%2C%0A%20%20%7D%3B%0A%7D%0A%0Afunction%20foo()%20%7B%0A%20%20%09const%20res%20%3D%20%7B%0A%20%20%20%20%09foo%3A%20%5B%5D%2C%0A%20%20%20%20%20%20%09bar%3A%20%5B%5D%2C%0A%20%20%20%20%7D%0A%20%20%20%20const%20r%20%3D%20foobar(1%2C%202)%0A%20%20%20%20res.foo.push(...r.foo)%0A%20%20%20%20res.bar.push(...r.bar)%0A%20%20%09return%20res%0A%7D%0A
Original code works, compiled code fails with
foobar(...) is not a function
.This is because lack of semicolons makes the resulting code be executed like this:
while it should be like this
The text was updated successfully, but these errors were encountered: