Skip to content
This repository has been archived by the owner on May 19, 2018. It is now read-only.

Incorrect parsing of Flow annotations with generics inside JSX #36

Closed
mroch opened this issue May 21, 2016 · 1 comment
Closed

Incorrect parsing of Flow annotations with generics inside JSX #36

mroch opened this issue May 21, 2016 · 1 comment

Comments

@mroch
Copy link
Contributor

mroch commented May 21, 2016

let foo = <bar x={function(x): Array<string> {}} />;

fails to parse (as of babylon-6.7.0: astexplorer), saying the / is unexpected.

wrapping Array<string> in parens parses correctly.

@sebmck
Copy link
Contributor

sebmck commented Jun 22, 2016

Found it, due to some weird context issues with identifying whether { is a statement or expression.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants