Skip to content

Commit

Permalink
fix flow tuple
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhauhau committed Jun 13, 2019
1 parent 19196c5 commit e63494d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 4 additions & 1 deletion packages/babel-parser/src/plugins/flow.js
Expand Up @@ -1281,7 +1281,10 @@ export default (superClass: Class<Parser>): Class<Parser> =>
});

case tt.bracketL:
return this.flowParseTupleType();
this.state.noAnonFunctionType = false;
type = this.flowParseTupleType();
this.state.noAnonFunctionType = oldNoAnonFunctionType;
return type;

case tt.relational:
if (this.state.value === "<") {
Expand Down
1 change: 0 additions & 1 deletion scripts/tests/flow/flow_tests_whitelist.txt
Expand Up @@ -9,7 +9,6 @@
# Entries should be removed incrementally as the babel parser is improved.

JSX_invalid/migrated_0000.js
arrow_function/tuple_return_type.js
arrow_function_invalid/migrated_0002.js
async_await/migrated_0007.js
async_await/migrated_0020.js
Expand Down

0 comments on commit e63494d

Please sign in to comment.