-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
Labels
Has PRoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issuepkg: generator
Description
Bug Report
Input Code
packages/babel-generator/test/fixtures/types/ArrowFunctionExpression2/input.js:
const pair = <T>(a: T): (T => T[]) => b => [a, b]packages/babel-generator/test/fixtures/types/ArrowFunctionExpression2/options.json:
{ "plugins": ["flow"] }Expected behavior/code
The output should be the same as the input, with the parentheses around (T => T[]).
Current Behavior
Output code is:
const pair = <T>(a: T): (T) => T[] => b => [a, b];The parentheses have moved from (T => T[]) to (T) => T[].
Flow now gives a parse error on the output, where it worked for the original.
Environment
- Babel version(s): master
- Node/npm version: Node 10/npm 6
- OS: Linux Mint 18.1
- Monorepo: yes
- How you are using Babel:
env TEST_ONLY=babel-generator make test
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Has PRoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issuepkg: generator