add inType assignment in flow parse declare method

This commit is contained in:
Sebastian McKenzie 2015-06-24 23:26:48 +01:00
parent c6eef3080e
commit d3884fd53b

View File

@ -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")