diff --git a/src/plugins/flow.js b/src/plugins/flow.js index 7c85da6255..5a6fb4ad51 100644 --- a/src/plugins/flow.js +++ b/src/plugins/flow.js @@ -506,6 +506,7 @@ pp.flowParsePrimaryType = function () { return this.finishNode(node, "FunctionTypeAnnotation"); } + break; case tt.parenL: this.next(); diff --git a/test/fixtures/flow/type-annotations/106/actual.js b/test/fixtures/flow/type-annotations/106/actual.js new file mode 100644 index 0000000000..0a8290512d --- /dev/null +++ b/test/fixtures/flow/type-annotations/106/actual.js @@ -0,0 +1 @@ +var f: >x:int) => string; diff --git a/test/fixtures/flow/type-annotations/106/options.json b/test/fixtures/flow/type-annotations/106/options.json new file mode 100644 index 0000000000..c958665c03 --- /dev/null +++ b/test/fixtures/flow/type-annotations/106/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token (1:7)" +}