From 2c3566de034ae93ccd37a620dd3a504286ebfe80 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Tue, 28 Jul 2015 19:26:52 +0100 Subject: [PATCH] remove flow types from being scope tracked - these aren't used anywhere and if they're going to be added back they need to be abstracted from bindings to create any real value - fixes #2105 --- packages/babel/src/traversal/scope/index.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/packages/babel/src/traversal/scope/index.js b/packages/babel/src/traversal/scope/index.js index a7542bf069..d2a5807c39 100644 --- a/packages/babel/src/traversal/scope/index.js +++ b/packages/babel/src/traversal/scope/index.js @@ -542,8 +542,6 @@ export default class Scope { this.registerBinding("let", path); } else if (path.isImportDeclaration() || path.isExportDeclaration()) { this.registerBinding("module", path); - } else if (path.isFlowDeclaration()) { - this.registerBinding("type", path); } else { this.registerBinding("unknown", path); } @@ -590,9 +588,6 @@ export default class Scope { for (var id of (ids[name]: Array)) { var local = this.getOwnBinding(name); if (local) { - // don't ever let a type alias shadow a local binding - if (kind === "type") continue; - // same identifier so continue safely as we're likely trying to register it // multiple times if (local.identifier === id) continue;