Fix handling of anonymous parameters in flowParseObjectTypeMethodish. (#526)

By analogy with `flowParseFunctionTypeParams` (cf. commit 407c97c9c2).
This commit is contained in:
Max Schaefer
2017-05-17 04:53:14 +08:00
committed by Daniel Tschinder
parent 4ef964e066
commit b08fdf87e8
3 changed files with 240 additions and 1 deletions

View File

@@ -470,7 +470,7 @@ export default (superClass: Class<Parser>): Class<Parser> => class extends super
}
this.expect(tt.parenL);
while (this.match(tt.name)) {
while (!this.match(tt.parenR) && !this.match(tt.ellipsis)) {
node.params.push(this.flowParseFunctionTypeParam());
if (!this.match(tt.parenR)) {
this.expect(tt.comma);