babel / babylon

PSA: moved into babel/babel as @babel/parser -->

Home Page:https://github.com/babel/babel/tree/master/packages/babel-parser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Existential return type annot in arrow function confused with `*=` operator

mroch opened this issue · comments

Input Code

const x = ():*=>{}

Babylon/Babel Configuration

flow plugin enabled

Expected Behavior

Should be an arrow function with a * type annotation

Current Behavior

"Unexpected token" pointing at the *=

Your Environment

babylon7-7.0.0-beta.12 and babylon6-6.17.1: http://astexplorer.net/#/gist/a4d0ae75b6e1db95a394fd591f31a8c9/8cb4469554642dd1ce1bae05742af3146406d8af

Flow parses it correctly

commented

Hey @mroch! 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.

I can pick this.

similar parse error in class fields:

@mroch can we take this as a separate bug?

This issue has been moved to babel/babel#6666.