Browse Source

prevent class method definitions erroneously appearing in statement.dependsOn

contingency-plan
Rich Harris 10 years ago
parent
commit
67d9b5847e
  1. 3
      src/Statement.js

3
src/Statement.js

@ -137,6 +137,9 @@ export default class Statement {
return;
}
// disregard the `bar` in `class Foo { bar () {...} }`
if ( parent.type === 'MethodDefinition' ) return;
const definingScope = scope.findDefiningScope( node.name );
if ( ( !definingScope || definingScope.depth === 0 ) && !this.defines[ node.name ] ) {

Loading…
Cancel
Save