skip flow types when finding rest parameter references

This commit is contained in:
Sebastian McKenzie
2015-06-26 23:29:09 +01:00
parent 50ca6b1018
commit 54819b94e9
3 changed files with 26 additions and 0 deletions

View File

@@ -9,6 +9,11 @@ var memberExpressionOptimisationVisitor = {
}
},
Flow() {
// don't touch reference in type annotations
this.skip();
},
Function(node, parent, scope, state) {
// skip over functions as whatever `arguments` we reference inside will refer
// to the wrong function