Browse Source

remove overzealous duplicate error

declarations-and-references
Rich-Harris 9 years ago
parent
commit
d61a0b4e01
  1. 1
      src/ast/Scope.js

1
src/ast/Scope.js

@ -86,7 +86,6 @@ export default class Scope {
this.parent.addDeclaration( node, isBlockDeclaration, isVar ); this.parent.addDeclaration( node, isBlockDeclaration, isVar );
} else { } else {
extractNames( node.id ).forEach( name => { extractNames( node.id ).forEach( name => {
if ( this.declarations[ name ] ) throw new Error( `Duplicate declaration (${name})` );
this.declarations[ name ] = new Declaration( name ); this.declarations[ name ] = new Declaration( name );
}); });
} }

Loading…
Cancel
Save