fix: Do not allow TypeCastExpressions w/o parens (#8956)

This commit is contained in:
Daniel Tschinder
2018-11-05 15:34:24 -08:00
committed by GitHub
parent b95cbc4a8e
commit e3b2c1afff
11 changed files with 26 additions and 27 deletions

View File

@@ -804,7 +804,7 @@ export default class ExpressionParser extends LValParser {
this.state.yieldInPossibleArrowParameters = null;
const params = [this.parseIdentifier()];
this.expect(tt.arrow);
// let foo = bar => {};
// let foo = async bar => {};
this.parseArrowExpression(node, params, true);
this.state.yieldInPossibleArrowParameters = oldYield;
return node;