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

Babel Transform += with await #8027

Closed
ICELI opened this issue May 24, 2018 · 2 comments
Closed

Babel Transform += with await #8027

ICELI opened this issue May 24, 2018 · 2 comments
Labels
area: upstream outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@ICELI
Copy link

ICELI commented May 24, 2018

Bug Report

Current Behavior
Babel transform x += await 2 different with x = x + await 2
but node v8.9.4 or chrome 66.0 that also be the same

Input Code

  • REPL or Repo link if applicable:
let x = 0

let log = function() {
  console.log(x, 'log')
  return 2;
}

async function test() {
  // x += await log() // case 1
  x = x + await log() // case 2
  console.log(x, 'test')
}

test()

x += 1
console.log(x, 'global')

// case1
// 0 "log"
// 1 "global"
// 3 "test"


// case2
// 0 "log"
// 1 "global"
// 2 "test"

http://babeljs.io/repl/#?babili=false&browsers=&build=&builtIns=false&code_lz=DYUwLgBAHhC8EAYBQTSWAewOZwgMwFcA7AYzAEsMiAKASggG8kIISqBnDUAOky2qgAaCAHI-I2swgAncAWlEIAJgDcSAL4oAhuwCepfMTKVFYEOzB1GUgPQ3oEANTwtAdy3l02K3dY6QEACMUjDwMI4Qbh5e_PS-JP7KUmxEnDx8AsIiZhYSGig5lpJI4fDBKWkgvN5ColiYAEZawHlI8f7BvggQAER8PW32gb31GE3AA74AzL2FAyjt7CBKg4i9_avDPaPjk_ZKs-Zg80A&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=true&fileSize=false&lineWrap=false&presets=latest%2Creact%2Cstage-2&prettier=false&targets=&version=6.26.0&envVersion=

@babel-bot
Copy link
Collaborator

Hey @ICELI! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community that typically always has someone willing to help. You can sign-up here
for an invite.

@nicolo-ribaudo
Copy link
Member

Moved to facebook/regenerator#345. Thank you for the bug report!

@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Aug 24, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Aug 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: upstream outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

No branches or pull requests

4 participants