Skip to content

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

@babel-bot

Description

@babel-bot

Issue originally reported by @mroch in babel/babylon#772

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: flowimportedoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issuepkg: parser

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions