From 9e0cc028ed41e3762cba5c56aaa79282a4d83b25 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 --- plugins/flow.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/flow.js b/plugins/flow.js index d60d63fa90..387634f84c 100644 --- a/plugins/flow.js +++ b/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")