fix isKeyword flow overload

This commit is contained in:
Sebastian McKenzie 2015-06-24 23:18:21 +01:00
parent 4fc1bbeb60
commit 7ccd135e83

View File

@ -690,7 +690,11 @@ acorn.plugins.flow = function (instance) {
// and set startExpr
instance.extend("isKeyword", function (inner) {
return function(name) {
return name !== "void" && inner.call(this, name)
if (this.inType && name === "void") {
return false
} else {
return inner.call(this, name)
}
}
})