Fix issues with flow-types and async function (#95)

the typeAnnotation was not correctly resolved in async
functions
This commit is contained in:
Daniel Tschinder
2016-08-23 23:22:01 +02:00
committed by Henry Zhu
parent 2cfae60b15
commit db0705bc51
4 changed files with 207 additions and 2 deletions

View File

@@ -946,7 +946,7 @@ pp.parseExprListItem = function (allowEmpty, refShorthandDefaultPos) {
} else if (this.match(tt.ellipsis)) {
elt = this.parseSpread(refShorthandDefaultPos);
} else {
elt = this.parseMaybeAssign(false, refShorthandDefaultPos);
elt = this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem);
}
return elt;
};