From d3884fd53bc5dcb041530f0b30197ce43865812a Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Wed, 24 Jun 2015 23:26:48 +0100 Subject: [PATCH] add inType assignment in flow parse declare method --- src/acorn/plugins/flow.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/acorn/plugins/flow.js b/src/acorn/plugins/flow.js index d60d63fa90..387634f84c 100644 --- a/src/acorn/plugins/flow.js +++ b/src/acorn/plugins/flow.js @@ -42,8 +42,11 @@ pp.flow_parseDeclareFunction = function (node) { typeNode.rest = tmp.rest this.expect(tt.parenR) + var oldInType = this.inType + this.inType = true this.expect(tt.colon) typeNode.returnType = this.flow_parseType() + this.inType = oldInType typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation") id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation")