Disallow await inside arrow functions (#9074)

* Disallow await inside arrow functions

* Update test262 whitelist
This commit is contained in:
Nicolò Ribaudo
2018-11-26 12:43:04 +01:00
committed by GitHub
parent 9308c870f5
commit 61f2aed5b0
7 changed files with 128 additions and 3 deletions

View File

@@ -1716,7 +1716,7 @@ export default class ExpressionParser extends LValParser {
const oldInAsync = this.state.inAsync;
const oldInGenerator = this.state.inGenerator;
const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
this.state.inAsync = true;
this.state.inAsync = isAsync;
this.state.inGenerator = false;
this.state.maybeInArrowParameters = false;
this.parseFunctionBody(node, true);