Fix accidental fall-through in Flow type parsing. (#82)
When parsing a primary type, `>` would erroneously be treated like `(`.
This commit is contained in:
parent
88d7e2012c
commit
fd18d89d8e
@ -506,6 +506,7 @@ pp.flowParsePrimaryType = function () {
|
|||||||
|
|
||||||
return this.finishNode(node, "FunctionTypeAnnotation");
|
return this.finishNode(node, "FunctionTypeAnnotation");
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case tt.parenL:
|
case tt.parenL:
|
||||||
this.next();
|
this.next();
|
||||||
|
|||||||
1
test/fixtures/flow/type-annotations/106/actual.js
vendored
Normal file
1
test/fixtures/flow/type-annotations/106/actual.js
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
var f: >x:int) => string;
|
||||||
3
test/fixtures/flow/type-annotations/106/options.json
vendored
Normal file
3
test/fixtures/flow/type-annotations/106/options.json
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"throws": "Unexpected token (1:7)"
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user