The { after a function generic type annotation is a statement (#578)
This would have previously been interpreted as an expression, because usually after ">" there can't be a statement. Fixes #36
This commit is contained in:
@@ -958,6 +958,7 @@ export default (superClass: Class<Parser>): Class<Parser> => class extends super
|
||||
this.state.inType = true;
|
||||
const type = this.flowParseUnionType();
|
||||
this.state.inType = oldInType;
|
||||
this.state.exprAllowed = false;
|
||||
return type;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user