Fix issues with flow-types and async function (#95)
the typeAnnotation was not correctly resolved in async functions
This commit is contained in:
committed by
Henry Zhu
parent
2cfae60b15
commit
db0705bc51
@@ -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;
|
||||
};
|
||||
|
||||
@@ -916,7 +916,7 @@ export default function (instance) {
|
||||
});
|
||||
|
||||
// parse an item inside a expression list eg. `(NODE, NODE)` where NODE represents
|
||||
// the position where this function is cal;ed
|
||||
// the position where this function is called
|
||||
instance.extend("parseExprListItem", function (inner) {
|
||||
return function (allowEmpty, refShorthandDefaultPos) {
|
||||
let container = this.startNode();
|
||||
|
||||
Reference in New Issue
Block a user