stop constructor verification traversal on FunctionDeclaration/FunctionExpression - fixes #1155

This commit is contained in:
Sebastian McKenzie
2015-04-04 14:01:26 +11:00
parent 91d78afc67
commit 56335409d3
4 changed files with 35 additions and 0 deletions

View File

@@ -62,6 +62,18 @@ var verifyConstructorVisitor = traverse.explode({
}
},
FunctionDeclaration: {
enter() {
this.skip();
}
},
FunctionExpression: {
enter() {
this.skip();
}
},
ThisExpression: {
enter(node, parent, scope, state) {
if (state.hasSuper && !state.hasBareSuper) {